File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ public function fetch(
339
339
$ cursor_orientation = \PDO ::FETCH_ORI_NEXT ,
340
340
$ cursor_offset = 0
341
341
) {
342
- if ($ fetch_style === -123 || $ fetch_style === \PDO ::FETCH_DEFAULT ) {
342
+ if ($ fetch_style === -123 || ( defined ( ' PDO::FETCH_DEFAULT ' ) && $ fetch_style === \PDO ::FETCH_DEFAULT ) ) {
343
343
$ fetch_style = $ this ->fetchMode ;
344
344
}
345
345
@@ -415,7 +415,7 @@ public function fetchColumn($column = 0)
415
415
*/
416
416
public function universalFetchAll (int $ fetch_style = -123 , ...$ args ) : array
417
417
{
418
- if ($ fetch_style === -123 || $ fetch_style === \PDO ::FETCH_DEFAULT ) {
418
+ if ($ fetch_style === -123 || ( defined ( ' PDO::FETCH_DEFAULT ' ) && $ fetch_style === \PDO ::FETCH_DEFAULT ) ) {
419
419
$ fetch_style = $ this ->fetchMode ;
420
420
$ fetch_argument = $ this ->fetchArgument ;
421
421
$ ctor_args = $ this ->fetchConstructorArgs ;
Original file line number Diff line number Diff line change @@ -54,6 +54,10 @@ public function testSelectWithDefaultFetchAssoc()
54
54
55
55
public function testSelectFetchDefault ()
56
56
{
57
+ if (!defined ('PDO::FETCH_DEFAULT ' )) {
58
+ $ this ->markTestSkipped ('PHP version does not support PDO::FETCH_DEFAULT ' );
59
+ }
60
+
57
61
$ pdo = self ::getConnectionToFullDB ();
58
62
59
63
$ query = $ pdo ->prepare ("SELECT id FROM `video_game_characters` WHERE `id` > :id ORDER BY `id` ASC " );
You can’t perform that action at this time.
0 commit comments