From 217b7048c549e1efb9db79edab14633e584e4e93 Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Wed, 24 Oct 2012 14:40:13 +0000 Subject: [PATCH] XML Datamodel: new format (fixed issue seen with some versions of PHP) SVN:trunk[2346] --- setup/modelfactory.class.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/modelfactory.class.inc.php b/setup/modelfactory.class.inc.php index fee954f5f..2a8fa8565 100644 --- a/setup/modelfactory.class.inc.php +++ b/setup/modelfactory.class.inc.php @@ -1409,7 +1409,7 @@ class MFElement extends DOMElement } else { - $aRanks[] = max($aRanks) + 1; + $aRanks[] = count($aRanks) > 0 ? max($aRanks) + 1 : 0; } array_multisort($aRanks, $res); }