]> 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 14:48:03 +0000 (16:48 +0200)
lib/files/cache/scanner.php

index 5588861fe9046c3af4d0aa97342c10c6cc7d4256..54f5d79eca7600ca41ba7614ba5ac8378f91e3cf 100644 (file)
@@ -85,7 +85,7 @@ class Scanner {
                                $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'];
                                                }