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
This commit is contained in:
@@ -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']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user