mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
PageTemplate/Fixup
* use get_object_vars() instead of property_exists() to test if we can load a variable from provided context. The former only returns accessible vars while the latter returns true for all properties.
This commit is contained in:
@@ -541,7 +541,7 @@ class PageTemplate
|
||||
if (!$this->context)
|
||||
return null;
|
||||
|
||||
if (!property_exists($this->context, $var))
|
||||
if (!isset(get_object_vars($this->context)[$var]))
|
||||
return null;
|
||||
|
||||
$this->rawData[$var] = $this->context->$var;
|
||||
|
||||
Reference in New Issue
Block a user