]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix numRows usage in core lib
authorJörn Friedrich Dreyer <jfd@butonic.de>
Thu, 20 Jun 2013 12:47:42 +0000 (14:47 +0200)
committerJörn Friedrich Dreyer <jfd@butonic.de>
Mon, 24 Jun 2013 14:29:59 +0000 (16:29 +0200)
lib/connector/sabre/locks.php
lib/vcategories.php

index cbc495dec19b8ce6699e6507dac0e1b83d1c5982..e057b05994764c9655b9d9cd63336d1992c4d7b2 100644 (file)
@@ -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;
 
        }
 
index 7bac6e7d4e34acc805e2ed2a32468ca0851fab22..8403695835973d7b73e1c381d66c604c8fe0e6c2 100644 (file)
@@ -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);