Skip to content

Commit

Permalink
Fix fatal error thrown if getResult() returns a boolean
Browse files Browse the repository at this point in the history
$result in real can be boolean so this will fix Fatal error:  Uncaught TypeError: Return value of Envms\FluentPDO\Queries\Base::getResult() must be an instance of PDOStatement or null, bool returned
  • Loading branch information
CrazyPHP authored Jun 17, 2021
1 parent 742518b commit 34e9692
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Queries/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ abstract class Base implements IteratorAggregate
/** @var Query */
protected $fluent;

/** @var PDOStatement */
/** @var PDOStatement|null|bool */
protected $result;

/** @var array - definition clauses */
Expand Down Expand Up @@ -216,9 +216,9 @@ protected function getStructure(): Structure
/**
* Get PDOStatement result
*
* @return ?PDOStatement
* @return PDOStatement|null|bool
*/
public function getResult(): ?PDOStatement
public function getResult()
{
return $this->result;
}
Expand Down

0 comments on commit 34e9692

Please sign in to comment.