aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-07-19 21:18:13 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-07-19 21:18:13 -0700
commit24ec104819bbc3778a159ea4790398988a6e2fd7 (patch)
tree7090cd7dc109b0e93bfb5464ef5fdb1a5977f147 /include/items.php
parent15b6e8faa489d6634d7a67c88572325237fbb749 (diff)
downloadvolse-hubzilla-24ec104819bbc3778a159ea4790398988a6e2fd7.tar.gz
volse-hubzilla-24ec104819bbc3778a159ea4790398988a6e2fd7.tar.bz2
volse-hubzilla-24ec104819bbc3778a159ea4790398988a6e2fd7.zip
silence warning about non array diaspora_meta but report it in the logs so we can find out what it actually is and why.
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);