From 356cde2d5c7f10607257d131cb5d5db94d904010 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Mon, 20 Jun 2022 16:03:32 -0400 Subject: [PATCH] Add empty check to Page::get() method to avoid potential illegal offset-type error --- wire/core/Page.php | 1 + 1 file changed, 1 insertion(+) diff --git a/wire/core/Page.php b/wire/core/Page.php index 4c300792..c978adb4 100644 --- a/wire/core/Page.php +++ b/wire/core/Page.php @@ -974,6 +974,7 @@ class Page extends WireData implements \Countable, WireMatchable { if($this->lazyLoad && $key !== 'id' && is_int($this->lazyLoad)) $this->_lazy(true); if(is_array($key)) $key = implode('|', $key); + if(empty($key)) return null; if(isset(PageProperties::$basePropertiesAlternates[$key])) { $key = PageProperties::$basePropertiesAlternates[$key]; }