Skip to content

Commit 1985e0e

Browse files
authored
Fix undefined class constant issue (#327)
Co-authored-by: Aleksandr Milenin <[email protected]>
1 parent 787c8fa commit 1985e0e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Queries/Base.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ abstract class Base implements IteratorAggregate
4040
protected $message = '';
4141

4242
/** @var int */
43-
protected $currentFetchMode = PDO::FETCH_DEFAULT;
43+
protected $currentFetchMode;
4444

4545
/**
4646
* BaseQuery constructor.
@@ -50,6 +50,7 @@ abstract class Base implements IteratorAggregate
5050
*/
5151
protected function __construct(Query $fluent, $clauses)
5252
{
53+
$this->currentFetchMode = defined('PDO::FETCH_DEFAULT') ? PDO::FETCH_DEFAULT : PDO::FETCH_BOTH;
5354
$this->fluent = $fluent;
5455
$this->clauses = $clauses;
5556
$this->result = null;

0 commit comments

Comments
 (0)