mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Re-indexed disallowed array because of json_encode issue with non-sequential array
This commit is contained in:
parent
9bce266639
commit
9037aa8645
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user