Re-indexed disallowed array because of json_encode issue with non-sequential array

This commit is contained in:
g4b0 2013-03-18 17:18:58 +01:00
parent 9bce266639
commit 9037aa8645
1 changed files with 2 additions and 1 deletions

View File

@ -422,7 +422,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
// then add the ones which are globally disallowed.
$disallowed = array_diff($classes, (array)$allowed);
$disallowed = array_unique(array_merge($disallowed, $globalDisallowed));
if($disallowed) $def[$class]['disallowedChildren'] = $disallowed;
// Re-index the array for JSON non sequential key issue
if($disallowed) $def[$class]['disallowedChildren'] = array_values($disallowed);
$defaultChild = $obj->defaultChild();
if($defaultChild != 'Page' && $defaultChild != null) {