Merge branch '3.5' into 3

This commit is contained in:
Daniel Hensby 2017-01-17 12:33:03 +00:00
commit 6f05242e3b
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E

View File

@ -2695,8 +2695,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
// Otherwise, the class and all its subclasses are allowed.
if(substr($candidate,0,1) == '*') {
$allowedChildren[] = substr($candidate,1);
} else {
$subclasses = ClassInfo::subclassesFor($candidate);
} elseif ($subclasses = ClassInfo::subclassesFor($candidate)) {
foreach($subclasses as $subclass) {
if ($subclass == 'SiteTree_root' || singleton($subclass) instanceof HiddenClass) {
continue;