mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +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.
|
// then add the ones which are globally disallowed.
|
||||||
$disallowed = array_diff($classes, (array)$allowed);
|
$disallowed = array_diff($classes, (array)$allowed);
|
||||||
$disallowed = array_unique(array_merge($disallowed, $globalDisallowed));
|
$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();
|
$defaultChild = $obj->defaultChild();
|
||||||
if($defaultChild != 'Page' && $defaultChild != null) {
|
if($defaultChild != 'Page' && $defaultChild != null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user