aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-09-06 20:07:53 -0700
committerzotlabs <mike@macgirvin.com>2017-09-06 20:07:53 -0700
commit41e0d5f6645e17fbd6dd26e0f5c7859a01d77462 (patch)
tree1e8b8cefd22d79750c3fb7847bd3861573d75c31 /include
parentfa7a6203fbb5fe87c7a6675124a80e370a899385 (diff)
downloadvolse-hubzilla-41e0d5f6645e17fbd6dd26e0f5c7859a01d77462.tar.gz
volse-hubzilla-41e0d5f6645e17fbd6dd26e0f5c7859a01d77462.tar.bz2
volse-hubzilla-41e0d5f6645e17fbd6dd26e0f5c7859a01d77462.zip
use array_key_exists() instead of x() in this case as the latter fails on an array that's empty and we unconditionally need to encode the array even if empty
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/items.php b/include/items.php
index d10d43687..f286015fe 100755
--- a/include/items.php
+++ b/include/items.php
@@ -2004,17 +2004,17 @@ function item_store_update($arr,$allow_exec = false, $deliver = true) {
$arr = $translate['item'];
}
- if((x($arr,'obj')) && is_array($arr['obj'])) {
+ if((array_key_exists('obj',$arr)) && is_array($arr['obj'])) {
activity_sanitise($arr['obj']);
$arr['obj'] = json_encode($arr['obj']);
}
- if((x($arr,'target')) && is_array($arr['target'])) {
+ if((array_key_exists('target',$arr)) && is_array($arr['target'])) {
activity_sanitise($arr['target']);
$arr['target'] = json_encode($arr['target']);
}
- if((x($arr,'attach')) && is_array($arr['attach'])) {
+ if((array_key_exists('attach',$arr)) && is_array($arr['attach'])) {
activity_sanitise($arr['attach']);
$arr['attach'] = json_encode($arr['attach']);
}