From f21acfe280b284b09c96e8b77794ac9cf74dc332 Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Mon, 2 Aug 2021 11:57:35 +0200 Subject: [PATCH] [PHP 8.1 compatibility] don't pass null to PDOStatement::fetch() (#17689) * 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 --- libs/Zend/Db/Statement/Pdo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/Zend/Db/Statement/Pdo.php b/libs/Zend/Db/Statement/Pdo.php index 4be698afe23..fb501eaf30d 100644 --- a/libs/Zend/Db/Statement/Pdo.php +++ b/libs/Zend/Db/Statement/Pdo.php @@ -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;