File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ public function free(): void
106106 // @link http://php.net/manual/en/pdostatement.closecursor.php
107107 // @link https://github.com/php/php-src/blob/php-7.0.11/ext/pdo/pdo_stmt.c#L2075
108108 // deliberately do not consider multiple result sets, since doctrine/dbal doesn't support them
109- while (sqlsrv_fetch ($ this ->statement )) {
109+ while (sqlsrv_fetch ($ this ->statement ) === true ) {
110110 }
111111 }
112112
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ protected function _getPortableTableColumnDefinition(array $tableColumn): Column
156156
157157 private function parseDefaultExpression (string $ value ): ?string
158158 {
159- while (preg_match ('/^\((.*)\)$/s ' , $ value , $ matches )) {
159+ while (preg_match ('/^\((.*)\)$/s ' , $ value , $ matches ) === 1 ) {
160160 $ value = $ matches [1 ];
161161 }
162162
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ public function testTruncatedFetch(
100100 }
101101
102102 try {
103- while ($ result ->fetchOne ()) {
103+ while ($ result ->fetchOne () !== false ) {
104104 // Attempt to access all remaining rows from the original fetch
105105 // The rows locally cached from the default prefetch will first be used
106106 // but when the result attempts to get the remaining 10 rows beyond
Original file line number Diff line number Diff line change @@ -36,15 +36,15 @@ public function testFullFetchMode(): void
3636
3737 $ result = $ this ->connection ->executeQuery ('SELECT * FROM portability_table ' );
3838
39- while (($ row = $ result ->fetchAssociative ())) {
39+ while (($ row = $ result ->fetchAssociative ()) !== false ) {
4040 $ this ->assertFetchResultRow ($ row );
4141 }
4242
4343 $ result = $ this ->connection
4444 ->prepare ('SELECT * FROM portability_table ' )
4545 ->executeQuery ();
4646
47- while (($ row = $ result ->fetchAssociative ())) {
47+ while (($ row = $ result ->fetchAssociative ()) !== false ) {
4848 $ this ->assertFetchResultRow ($ row );
4949 }
5050 }
You can’t perform that action at this time.
0 commit comments