@@ -134,7 +134,7 @@ public function getUsersOwnAddressBooks($principalUri) {
134134 '{http://sabredav.org/ns}sync-token ' => $ row ['synctoken ' ] ?: '0 ' ,
135135 ];
136136 }
137- $ result ->closeCursor ();
137+ $ result ->free ();
138138 return \array_values ($ addressBooks );
139139 }
140140
@@ -198,7 +198,7 @@ public function getAddressBooksForUser($principalUri) {
198198 ];
199199 }
200200 }
201- $ result ->closeCursor ();
201+ $ result ->free ();
202202
203203 return \array_values ($ addressBooks );
204204 }
@@ -214,7 +214,7 @@ public function getAddressBookById($addressBookId) {
214214 ->execute ();
215215
216216 $ row = $ result ->fetch ();
217- $ result ->closeCursor ();
217+ $ result ->free ();
218218 if ($ row === false ) {
219219 return null ;
220220 }
@@ -244,7 +244,7 @@ public function getAddressBooksByUri($principal, $addressBookUri) {
244244 ->execute ();
245245
246246 $ row = $ result ->fetch ();
247- $ result ->closeCursor ();
247+ $ result ->free ();
248248 if ($ row === false ) {
249249 return null ;
250250 }
@@ -425,7 +425,7 @@ public function getCards($addressBookId) {
425425 $ row ['carddata ' ] = $ this ->readBlob ($ row ['carddata ' ]);
426426 $ cards [] = $ row ;
427427 }
428- $ result ->closeCursor ();
428+ $ result ->free ();
429429
430430 return $ cards ;
431431 }
@@ -491,7 +491,7 @@ public function getMultipleCards($addressBookId, array $uris) {
491491 $ row ['carddata ' ] = $ this ->readBlob ($ row ['carddata ' ]);
492492 $ cards [] = $ row ;
493493 }
494- $ result ->closeCursor ();
494+ $ result ->free ();
495495
496496 return $ cards ;
497497 }
@@ -880,7 +880,7 @@ public function searchEx($addressBookId, $pattern, $searchProperties, $options,
880880 $ result = $ query ->execute ();
881881 $ cards = $ result ->fetchAll ();
882882
883- $ result ->closeCursor ();
883+ $ result ->free ();
884884
885885 return \array_map (function ($ array ) {
886886 $ array ['carddata ' ] = $ this ->readBlob ($ array ['carddata ' ]);
@@ -902,7 +902,7 @@ public function collectCardProperties($bookId, $name) {
902902 ->execute ();
903903
904904 $ all = $ result ->fetchAll (PDO ::FETCH_COLUMN );
905- $ result ->closeCursor ();
905+ $ result ->free ();
906906
907907 return $ all ;
908908 }
@@ -922,7 +922,7 @@ public function getCardUri($id) {
922922
923923 $ result = $ query ->execute ();
924924 $ uri = $ result ->fetch ();
925- $ result ->closeCursor ();
925+ $ result ->free ();
926926
927927 if (!isset ($ uri ['uri ' ])) {
928928 throw new \InvalidArgumentException ('Card does not exist: ' . $ id );
@@ -946,7 +946,7 @@ public function getContact($addressBookId, $uri) {
946946 ->andWhere ($ query ->expr ()->eq ('addressbookid ' , $ query ->createNamedParameter ($ addressBookId )));
947947 $ queryResult = $ query ->execute ();
948948 $ contact = $ queryResult ->fetch ();
949- $ queryResult ->closeCursor ();
949+ $ queryResult ->free ();
950950
951951 if (\is_array ($ contact )) {
952952 $ result = $ contact ;
@@ -1059,7 +1059,7 @@ protected function getCardId($addressBookId, $uri) {
10591059
10601060 $ result = $ query ->execute ();
10611061 $ cardIds = $ result ->fetch ();
1062- $ result ->closeCursor ();
1062+ $ result ->free ();
10631063
10641064 if (!isset ($ cardIds ['id ' ])) {
10651065 throw new \InvalidArgumentException ('Card does not exist: ' . $ uri );
0 commit comments