Skip to content

Commit 91bf624

Browse files
committed
init element q to array before use.
otherwise if the app is started while keys _do_ exist, and the first key searched exists, there will be an error inside manageSize.
1 parent ce3d01c commit 91bf624

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cache/DefaultCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class DefaultCache implements CacheInterface
1717
public function __construct(int $maxsize, int $ttl)
1818
{
1919
$this->cache = new \Sabre\Cache\Memory();
20-
$this->element_queue;
20+
$this->element_queue = array();
2121
$this->maxsize = $maxsize;
2222
$this->ttl = $ttl;
2323
}

0 commit comments

Comments
 (0)