Skip to content

Commit

Permalink
[PHP 8.1 compatibility] don't pass null to PDOStatement::fetch() (#17689
Browse files Browse the repository at this point in the history
)

* don't pass null to PDOStatement::fetch()

* use FETCH_BOTH as default

* do not set default value for $style

it's set in the method if null was given

Co-authored-by: Stefan Giehl <[email protected]>
  • Loading branch information
Findus23 and sgiehl authored Aug 2, 2021
1 parent 44daea1 commit f21acfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/Zend/Db/Statement/Pdo.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public function _execute(array $params = null)
* @return mixed Array, object, or scalar depending on fetch mode.
* @throws Zend_Db_Statement_Exception
*/
public function fetch($style = null, $cursor = null, $offset = null)
public function fetch($style = null, $cursor = \PDO::FETCH_ORI_NEXT, $offset = 0)
{
if ($style === null) {
$style = $this->_fetchMode;
Expand Down

0 comments on commit f21acfe

Please sign in to comment.