]> 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 19:32:48 +0000 (15:32 -0400)
lib/files/cache/scanner.php

index bcd6032fcac7649e108afc5c72607451936deb48..520b41fe10423e171db516ae68892b61d48073c8 100644 (file)
@@ -108,9 +108,9 @@ class Scanner extends BasicEmitter {
                                        // 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;
                }