From 1c22b1f62603f4dd817a7326343cc843584a77d9 Mon Sep 17 00:00:00 2001
From: derkostka <sebastian.kostka@gmail.com>
Date: Fri, 19 Dec 2014 12:09:46 +0100
Subject: [PATCH] Fix Undefined variable: result at tags.php#231

Fix app":"PHP","message":"Undefined variable: result at \/var\/www\/owncloud\/lib\/private\/tags.php#231" by moving the function call into the respective loop

Adjust indentation

Do it right - indentation

sorry, this is my first one
---
 lib/private/tags.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/private/tags.php b/lib/private/tags.php
index e00c1b90ca..9ff433b698 100644
--- a/lib/private/tags.php
+++ b/lib/private/tags.php
@@ -227,10 +227,10 @@ class Tags implements \OCP\ITags {
 					}
 					$entry = $entries[$objId][] = $row['category'];
 				}
-			}
-			if (\OCP\DB::isError($result)) {
-				\OCP\Util::writeLog('core', __METHOD__. 'DB error: ' . \OCP\DB::getErrorMessage($result), \OCP\Util::ERROR);
-				return false;
+				if (\OCP\DB::isError($result)) {
+					\OCP\Util::writeLog('core', __METHOD__. 'DB error: ' . \OCP\DB::getErrorMessage($result), \OCP\Util::ERROR);
+					return false;
+				}
 			}
 		} catch(\Exception $e) {
 			\OCP\Util::writeLog('core', __METHOD__.', exception: '.$e->getMessage(),
-- 
GitLab