Skip to content

Commit 77f173b

Browse files
brstgtNyholm
authored andcommitted
Handle PHP-bug with single char vars (#205)
We encounter an issue with single-char PHP vars in production (running on amphp/aerys). We observe regularly, that single-char-vars become undefined. After PHP restart everything is ok again. The bug definitely exists in 7.1.9 + 7.1.11 Fixing that bug is hard, a workaround is simple and does not harm. Thanks!
1 parent 4674b52 commit 77f173b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CacheItem.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ private function tag($tags)
240240
private function initialize()
241241
{
242242
if ($this->callable !== null) {
243-
// $f will be $adapter->fetchObjectFromCache();
244-
$f = $this->callable;
245-
$result = $f();
243+
// $func will be $adapter->fetchObjectFromCache();
244+
$func = $this->callable;
245+
$result = $func();
246246
$this->hasValue = $result[0];
247247
$this->value = $result[1];
248248
$this->prevTags = isset($result[2]) ? $result[2] : [];

0 commit comments

Comments
 (0)