Skip to content

Commit 09a81d3

Browse files
committed
Do not use the members that have not been set(null).
1 parent b3f827b commit 09a81d3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,14 @@ private function getCacheKey(): string
5454

5555
$parameters = [];
5656
foreach ($reflection->getProperties() as $property) {
57-
$parameters[$property->getName()] = $property->getValue($this);
57+
$value = $property->getValue($this);
58+
if ($value === null) {
59+
continue;
60+
}
61+
62+
$parameters[$property->getName()] = $value;
5863
}
64+
5965
if ($parameters !== []) {
6066
$this->cacheName .= '-' . CacheHandler::getInstance()->getCacheIndex($parameters);
6167
}

0 commit comments

Comments
 (0)