Pages/Caching

* use native functions of ReflectionProperty instead of magic numbers. GetModifiers() may return different values then expected/documented
This commit is contained in:
Sarjuuk
2020-09-02 21:17:05 +02:00
parent 04a14393e5
commit 583f8658d7

View File

@@ -943,8 +943,8 @@ class GenericPage
{ {
try try
{ {
// public, protected and an undocumented flag added to properties created on the fly..? $rp = new ReflectionProperty($this, $key);
if ((new ReflectionProperty($this, $key))->getModifiers() & 0x1300) if ($rp && ($rp->isPublic() || $rp->isProtected()))
if (!in_array($key, $noCache)) if (!in_array($key, $noCache))
$cache[$key] = $val; $cache[$key] = $val;
} }