mirror of
https://github.com/processwire/processwire.git
synced 2025-08-10 00:37:02 +02:00
Add empty check to Page::get() method to avoid potential illegal offset-type error
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
Reference in New Issue
Block a user