use isset to prevent undefined index
This commit is contained in:
parent
bf1a9dfae3
commit
464afb5eca
|
@ -98,7 +98,7 @@ class Scanner extends BasicEmitter {
|
||||||
$newData = $data;
|
$newData = $data;
|
||||||
if ($reuseExisting and $cacheData = $this->cache->get($file)) {
|
if ($reuseExisting and $cacheData = $this->cache->get($file)) {
|
||||||
// only reuse data if the file hasn't explicitly changed
|
// only reuse data if the file hasn't explicitly changed
|
||||||
if ($data['mtime'] === $cacheData['mtime']) {
|
if (isset($data['mtime']) && isset($cacheData['mtime']) && $data['mtime'] === $cacheData['mtime']) {
|
||||||
if (($reuseExisting & self::REUSE_SIZE) && ($data['size'] === -1)) {
|
if (($reuseExisting & self::REUSE_SIZE) && ($data['size'] === -1)) {
|
||||||
$data['size'] = $cacheData['size'];
|
$data['size'] = $cacheData['size'];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue