Skip to content

Commit fa8d284

Browse files
committed
Prevent access to uninitialized members or static variables
1 parent 09a81d3 commit fa8d284

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

wcfsetup/install/files/lib/system/cache/eager/AbstractEagerCache.class.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ private function getCacheKey(): string
5353
);
5454

5555
$parameters = [];
56-
foreach ($reflection->getProperties() as $property) {
56+
foreach ($reflection->getProperties(\ReflectionProperty::IS_READONLY) as $property) {
57+
if (!$property->isInitialized($this)) {
58+
continue;
59+
}
60+
5761
$value = $property->getValue($this);
5862
if ($value === null) {
5963
continue;

0 commit comments

Comments
 (0)