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 6dfa99c commit 8d1660fCopy full SHA for 8d1660f
src/LogFile.php
@@ -75,11 +75,13 @@ public function type(): LogType
75
76
public function index(?string $query = null): LogIndex
77
{
78
- if (! isset($this->_logIndexCache[$query])) {
79
- $this->_logIndexCache[$query] = new LogIndex($this, $query);
+ $cacheKey = $query ?? '';
+
80
+ if (! isset($this->_logIndexCache[$cacheKey])) {
81
+ $this->_logIndexCache[$cacheKey] = new LogIndex($this, $query);
82
}
83
- return $this->_logIndexCache[$query];
84
+ return $this->_logIndexCache[$cacheKey];
85
86
87
public function logs(): LogReaderInterface
0 commit comments