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
{
// public, protected and an undocumented flag added to properties created on the fly..?
if ((new ReflectionProperty($this, $key))->getModifiers() & 0x1300)
$rp = new ReflectionProperty($this, $key);
if ($rp && ($rp->isPublic() || $rp->isProtected()))
if (!in_array($key, $noCache))
$cache[$key] = $val;
}