aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/items.php b/include/items.php
index d24dbed9f..af57e3eda 100755
--- a/include/items.php
+++ b/include/items.php
@@ -1282,10 +1282,12 @@ function encode_item($item,$mirror = false) {
if($item['diaspora_meta']) {
$z = json_decode($item['diaspora_meta'],true);
if($z) {
- if(array_key_exists('iv',$z))
+ if(is_array($z) && array_key_exists('iv',$z))
$x['diaspora_signature'] = crypto_unencapsulate($z,$key);
else
$x['diaspora_signature'] = $z;
+ if(! is_array($z))
+ logger('encode_item: diaspora meta is not an array: ' . print_r($z,true));
}
}
logger('encode_item: ' . print_r($x,true), LOGGER_DATA);