From 1297114b3e07c775d9b7bbbcd5cdf8c7a8bdc999 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Thu, 4 Mar 2021 17:10:02 +0200 Subject: [PATCH] Make sure that variable is defined in PageIndex::getLevelListing() --- system/src/Grav/Common/Flex/Types/Pages/PageIndex.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/src/Grav/Common/Flex/Types/Pages/PageIndex.php b/system/src/Grav/Common/Flex/Types/Pages/PageIndex.php index 17d33376c..c5b7ce964 100644 --- a/system/src/Grav/Common/Flex/Types/Pages/PageIndex.php +++ b/system/src/Grav/Common/Flex/Types/Pages/PageIndex.php @@ -310,6 +310,7 @@ class PageIndex extends FlexPageIndex implements PageCollectionInterface /** @var Debugger $debugger */ $debugger = Grav::instance()['debugger']; + $result = null; try { $cached = $cache->get($key); $test = $cached[0] ?? null; @@ -319,7 +320,7 @@ class PageIndex extends FlexPageIndex implements PageCollectionInterface } try { - if (!isset($result)) { + if (null === $result) { $result = $this->getLevelListingRecurse($options); $cache->set($key, [$checksum, $result]); }