Skip to content

Commit

Permalink
PHP 8.1 PHP Deprecated:
Browse files Browse the repository at this point in the history
- strtr(): Passing null to parameter Shardj#1 ($string) of type string is deprecated
- PDOStatement::fetch(): Passing null to parameter Shardj#3 ($cursorOffset) of type int is deprecated
- PDOStatement::fetch(): Passing null to parameter Shardj#2 ($cursorOrientation) of type int is deprecated
  • Loading branch information
EugenePikalov committed Jan 11, 2022
1 parent e457980 commit b5a491c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion library/Zend/Db/Statement/Pdo.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,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
3 changes: 3 additions & 0 deletions library/Zend/Mail.php
Original file line number Diff line number Diff line change
Expand Up @@ -1231,6 +1231,9 @@ protected function _filterEmail($email)
*/
protected function _filterName($name)
{
if(is_null($name)) {
return null;
}
$rule = ["\r" => '',
"\n" => '',
"\t" => '',
Expand Down
3 changes: 3 additions & 0 deletions library/Zend/View/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,9 @@ public function render($name)
*/
public function escape($var)
{
if(is_null($var)) {
return null;
}
if (in_array($this->_escape, ['htmlspecialchars', 'htmlentities'])) {
return call_user_func($this->_escape, $var, ENT_COMPAT, $this->_encoding);
}
Expand Down

0 comments on commit b5a491c

Please sign in to comment.