aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/text.php4
-rw-r--r--include/zot.php5
2 files changed, 7 insertions, 2 deletions
diff --git a/include/text.php b/include/text.php
index d19519779..ef2fc2371 100644
--- a/include/text.php
+++ b/include/text.php
@@ -1946,9 +1946,9 @@ function find_xchan_in_array($xchan,$arr) {
}
function get_rel_link($j,$rel) {
- if(count($j))
+ if(is_array($j) && ($j))
foreach($j as $l)
- if($l['rel'] === $rel)
+ if(array_key_exists('rel',$j) && $l['rel'] === $rel && array_key_exists('href',$l))
return $l['href'];
return '';
diff --git a/include/zot.php b/include/zot.php
index 1e9577dc6..0e1c5165a 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -1084,6 +1084,11 @@ function zot_import($arr, $sender_url) {
if(is_array($incoming)) {
foreach($incoming as $i) {
+ if(! is_array($i)) {
+ logger('incoming is not an array');
+ continue;
+ }
+
$result = null;
if(array_key_exists('iv',$i['notify'])) {