From: Jörn Friedrich Dreyer Date: Thu, 20 Jun 2013 12:47:42 +0000 (+0200) Subject: fix numRows usage in core lib X-Git-Tag: v6.0.0alpha2~578^2~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c223bee6df33b3208dbb5a7c46dbeb98eccf10ac;p=nextcloud-server.git fix numRows usage in core lib --- diff --git a/lib/connector/sabre/locks.php b/lib/connector/sabre/locks.php index cbc495dec19..e057b059947 100644 --- a/lib/connector/sabre/locks.php +++ b/lib/connector/sabre/locks.php @@ -178,7 +178,7 @@ class OC_Connector_Sabre_Locks extends Sabre_DAV_Locks_Backend_Abstract { $sql = 'DELETE FROM `*PREFIX*locks` WHERE `userid` = ? AND `uri` = ? AND `token` = ?'; $result = OC_DB::executeAudited( $sql, array(OC_User::getUser(), $uri, $lockInfo->token)); - return $result->numRows() === 1; + return $result === 1; } diff --git a/lib/vcategories.php b/lib/vcategories.php index 7bac6e7d4e3..84036958359 100644 --- a/lib/vcategories.php +++ b/lib/vcategories.php @@ -125,7 +125,7 @@ class OC_VCategories { OC_Log::write('core', __METHOD__. 'DB error: ' . OC_DB::getErrorMessage($result), OC_Log::ERROR); return false; } - return ($result->numRows() == 0); + return ($result->numRows() === 0); } catch(Exception $e) { OCP\Util::writeLog('core', __METHOD__.', exception: '.$e->getMessage(), OCP\Util::ERROR);