[TASK] Make array fault tolerant for recieving objects
This commit is contained in:
parent
e08526325d
commit
8927f3c402
@ -45,7 +45,11 @@ class ArrayUtility
|
|||||||
$value = self::removeEmptyStrings($value);
|
$value = self::removeEmptyStrings($value);
|
||||||
} else {
|
} else {
|
||||||
if (is_string($value) && !strlen($value)) {
|
if (is_string($value) && !strlen($value)) {
|
||||||
|
if (is_array($array)) {
|
||||||
unset($array[$key]);
|
unset($array[$key]);
|
||||||
|
} else {
|
||||||
|
unset($array->$key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user