From: Michael Gapczynski Date: Sun, 28 Jul 2013 19:32:48 +0000 (-0400) Subject: Move check so the variable will never be undefined X-Git-Tag: v5.0.10~36 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=73ab147f250dabf2672ae707f7e9fa0478809e1c;p=nextcloud-server.git Move check so the variable will never be undefined --- diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php index cb62f2ba310..5588861fe90 100644 --- a/lib/files/cache/scanner.php +++ b/lib/files/cache/scanner.php @@ -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; }