Merge pull request #13772 from owncloud/closecursor-allconfig

Close cursor after checking for existing config values
This commit is contained in:
Vincent Petry 2015-01-29 19:31:21 +01:00
commit 790622e9fd
1 changed files with 1 additions and 0 deletions

View File

@ -181,6 +181,7 @@ class AllConfig implements \OCP\IConfig {
'WHERE `userid` = ? AND `appid` = ? AND `configkey` = ?'; 'WHERE `userid` = ? AND `appid` = ? AND `configkey` = ?';
$result = $this->connection->executeQuery($sql, array($userId, $appName, $key)); $result = $this->connection->executeQuery($sql, array($userId, $appName, $key));
$oldValue = $result->fetchColumn(); $oldValue = $result->fetchColumn();
$result->closeCursor();
$exists = $oldValue !== false; $exists = $oldValue !== false;
if($oldValue === strval($value)) { if($oldValue === strval($value)) {