From 24ec104819bbc3778a159ea4790398988a6e2fd7 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sun, 19 Jul 2015 21:18:13 -0700 Subject: silence warning about non array diaspora_meta but report it in the logs so we can find out what it actually is and why. --- include/items.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/items.php') 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); -- cgit v1.2.3