From c8e60900fc75de39fbdf4dc6880f2e1cd61654ec Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Sun, 28 Jul 2013 15:32:48 -0400 Subject: [PATCH] Move check so the variable will never be undefined --- lib/files/cache/scanner.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php index bcd6032fcac..520b41fe104 100644 --- a/lib/files/cache/scanner.php +++ b/lib/files/cache/scanner.php @@ -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; } -- 2.39.5