From bdccbdfbcfa006d41abcfb53c196e1ec5ae108be Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 11 Aug 2009 04:46:47 +0000 Subject: [PATCH] MINOR: Fixed notice-level error git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84148 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/SiteTree.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 1549144ba..ad3fba36e 100644 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -881,6 +881,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid // Default result: nothing editable $result = array_fill_keys($ids, false); + if($ids) { // Look in the cache for values @@ -982,6 +983,8 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid // Look in the cache for values if($useCached && isset(self::$cache_permissions['delete'])) { + $result = array_fill_keys($ids, false); + $cachedValues = array_intersect_key(self::$cache_permissions['delete'], $result); // If we can't find everything in the cache, then look up the remainder separately