We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c29121 commit 899e753Copy full SHA for 899e753
src/Types/AbstractCypherSequence.php
@@ -526,7 +526,9 @@ private function setupCache(): void
526
{
527
$generator = $this->getGenerator();
528
529
- if (count($this->keyCache) !== 0 && count($this->cache) !== 0 && count($this->cache) % ($this->cacheLimit + 1) === 0) {
+ $cacheLimit = $this->cacheLimit === PHP_INT_MAX ? PHP_INT_MAX : $this->cacheLimit + 1;
530
+
531
+ if (count($this->keyCache) !== 0 && count($this->cache) !== 0 && count($this->cache) % $cacheLimit === 0) {
532
$this->cache = [array_key_last($this->cache) => $this->cache[array_key_last($this->cache)]];
533
$this->keyCache = [$this->keyCache[array_key_last($this->keyCache)]];
534
}
0 commit comments