]> source.dussan.org Git - nextcloud-server.git/commitdiff
use isset to prevent undefined index
authorThomas Müller <thomas.mueller@tmit.eu>
Mon, 5 Aug 2013 11:51:45 +0000 (13:51 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Mon, 5 Aug 2013 11:51:45 +0000 (13:51 +0200)
lib/files/cache/scanner.php

index dd212d84cc531a038978a23cb9fa82ae0e7bb277..adecc2bb901e80934a4cd5e6e8fd6c62273d4149 100644 (file)
@@ -98,7 +98,7 @@ class Scanner extends BasicEmitter {
                                $newData = $data;
                                if ($reuseExisting and $cacheData = $this->cache->get($file)) {
                                        // 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)) {
                                                        $data['size'] = $cacheData['size'];
                                                }