]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix last failures with oracle
authorJoas Schilling <coding@schilljs.com>
Mon, 24 Jul 2017 16:05:08 +0000 (18:05 +0200)
committerJoas Schilling <coding@schilljs.com>
Thu, 3 Aug 2017 14:40:46 +0000 (16:40 +0200)
Signed-off-by: Joas Schilling <coding@schilljs.com>
lib/private/Share/Share.php
tests/lib/Repair/NC12/UpdateLanguageCodesTest.php
tests/lib/Share/ShareTest.php

index dc96d856ba60cef946f60b38302c7ebe2fb480e0..58f44255d9a2750ee78094bd77f78afd8fe056cf 100644 (file)
@@ -338,6 +338,7 @@ class Share extends Constants {
                                                        }
                                                }
                                        }
+                                       $result->closeCursor();
                                }
                        }
 
@@ -1461,8 +1462,9 @@ class Share extends Constants {
                        ->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');
index 4379d1ba589a629ef946213e370e87c3fcc4d368..46422589541094d76dac86901b47858ccccdb10d 100644 (file)
@@ -24,6 +24,7 @@
 namespace Test\Repair\NC12;
 
 use OC\Repair\NC12\UpdateLanguageCodes;
+use OCP\DB\QueryBuilder\IQueryBuilder;
 use OCP\IConfig;
 use OCP\Migration\IOutput;
 use Test\TestCase;
@@ -152,7 +153,7 @@ class UpdateLanguageCodesTest extends 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();
                }
        }
index 40e88d597a46e0d513fc9942b3eb3b002fb6c8fa..4ce40a2accd3f9919a174cd90a729f358696f567 100644 (file)
@@ -1246,7 +1246,9 @@ class ShareTest extends \Test\TestCase {
                   ->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'];
 
@@ -1260,7 +1262,9 @@ class ShareTest extends \Test\TestCase {
                   ->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();