}
}
}
+ $result->closeCursor();
}
}
->from('share')
->where($qb->expr()->eq('id', $qb->createParameter('shareId')))
->setParameter(':shareId', $shareId);
- $result = $qb->execute();
- $result = $result->fetch();
+ $dbResult = $qb->execute();
+ $result = $dbResult->fetch();
+ $dbResult->closeCursor();
if (empty($result)) {
throw new \Exception('Share not found');
namespace Test\Repair\NC12;
use OC\Repair\NC12\UpdateLanguageCodes;
+use OCP\DB\QueryBuilder\IQueryBuilder;
use OCP\IConfig;
use OCP\Migration\IOutput;
use Test\TestCase;
->where($qb->expr()->eq('userid', $qb->createNamedParameter($user['userid'])))
->andWhere($qb->expr()->eq('appid', $qb->createNamedParameter('core')))
->andWhere($qb->expr()->eq('configkey', $qb->createNamedParameter('lang')))
- ->andWhere($qb->expr()->eq('configvalue', $qb->createNamedParameter($user['configvalue'])))
+ ->andWhere($qb->expr()->eq('configvalue', $qb->createNamedParameter($user['configvalue']), IQueryBuilder::PARAM_STR))
->execute();
}
}
->setParameter('owner', $this->user1->getUID())
->setParameter('share_type', \OCP\Share::SHARE_TYPE_LINK);
- $res = $qb->execute()->fetchAll();
+ $result = $qb->execute();
+ $res = $result->fetchAll();
+ $result->closeCursor();
$this->assertCount(1, $res);
$id = $res[0]['id'];
->from('share')
->where($qb->expr()->eq('id', $qb->createParameter('id')))
->setParameter('id', $id);
- $hash = $qb->execute()->fetch()['share_with'];
+ $result = $qb->execute();
+ $hash = $result->fetch()['share_with'];
+ $result->closeCursor();
$hasher = \OC::$server->getHasher();