From 72f3af9fc9ed6cb5be278959e66d23ba462eb0be Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 14 Jan 2019 15:01:43 +0100 Subject: [PATCH] BpNode: Reset keys when automatically sorting nodes --- library/Businessprocess/BpNode.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/library/Businessprocess/BpNode.php b/library/Businessprocess/BpNode.php index 1ce5f0b..dc0c3fa 100644 --- a/library/Businessprocess/BpNode.php +++ b/library/Businessprocess/BpNode.php @@ -428,6 +428,7 @@ class BpNode extends Node { if (! $this->bp->getMetadata()->isManuallyOrdered()) { natcasesort($names); + $names = array_values($names); } $this->childNames = $names; @@ -451,6 +452,7 @@ class BpNode extends Node $this->children = array(); if (! $this->bp->getMetadata()->isManuallyOrdered()) { natcasesort($this->childNames); + $this->childNames = array_values($this->childNames); } foreach ($this->childNames as $name) { $this->children[$name] = $this->bp->getNode($name);