NodeAction: Force parsing objects as associative arrays during unserialization

This commit is contained in:
Johannes Meyer 2020-06-26 11:18:28 +02:00
parent a9faf8a9ac
commit 67a7687606

View file

@ -144,10 +144,10 @@ abstract class NodeAction
*/
public static function unSerialize($string)
{
$object = json_decode($string);
$action = self::create($object->actionName, $object->nodeName);
$object = json_decode($string, JSON_FORCE_OBJECT);
$action = self::create($object['actionName'], $object['nodeName']);
foreach ($object->properties as $key => $val) {
foreach ($object['properties'] as $key => $val) {
$func = 'set' . ucfirst($key);
$action->$func($val);
}