]> source.dussan.org Git - nextcloud-server.git/commitdiff
Move check so the variable will never be undefined
authorMichael Gapczynski <mtgap@owncloud.com>
Sun, 28 Jul 2013 19:32:48 +0000 (15:32 -0400)
committerMichael Gapczynski <mtgap@owncloud.com>
Sun, 28 Jul 2013 23:33:58 +0000 (19:33 -0400)
lib/files/cache/scanner.php

index cb62f2ba31032bebe4ea7062ca758bbf502c2179..5588861fe9046c3af4d0aa97342c10c6cc7d4256 100644 (file)
@@ -96,9 +96,9 @@ class Scanner {
                                        // Only update metadata that has changed
                                        $newData = array_diff($data, $cacheData);
                                }
-                       }
-                       if (!empty($newData)) {
-                               $this->cache->put($file, $newData);
+                               if (!empty($newData)) {
+                                       $this->cache->put($file, $newData);
+                               }
                        }
                        return $data;
                }