mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-01-10 23:22:53 -05:00
NodeAction: Force parsing objects as associative arrays during unserialization
This commit is contained in:
parent
a9faf8a9ac
commit
67a7687606
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue