Skip to content

Commit

Permalink
fixing errors and warnings for php 8.1
Browse files Browse the repository at this point in the history
- substr(): Passing null to parameter #1 ($string) of type string is deprecated
- strtolower(): Passing null to parameter #1 ($string) of type string is deprecated
- strlen(): Passing null to parameter #1 ($string) of type string is deprecated
- trim(): Passing null to parameter #1 ($string) of type string is deprecated
- str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated
- strstr(): Passing null to parameter #1 ($haystack) of type string is deprecated
- http_build_query(): Passing null to parameter #2 ($numeric_prefix) of type string is deprecated
- current(): Calling current() on an object is deprecated
- preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
- preg_match(): Passing null to parameter #4 ($flags) of type int is deprecated
- always construct Zend_Exception with string message, avoid null
- Implicit conversion from float-string "x.xyz" to int loses precision
- PDOStatement::fetch(): Passing null to parameter #2 ($cursorOrientation) of type int is deprecated
- ctype_space(): Argument of type null will be interpreted as string in the future
- file_get_contents(): Passing null to parameter #2 ($use_include_path) of type bool is deprecated
- imagefilledpolygon(): Using the $num_points parameter is deprecated
- Implicit conversion from float to int loses precision
- PDOStatement::bindParam(): Passing null to parameter #4 ($maxLength) of type int is deprecated
- preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated
- ctype_print(): Argument of type int will be interpreted as string in the future
- trim(): Passing null to parameter #1 ($string) of type string is deprecated
etc.
  • Loading branch information
falkenhawk committed Dec 6, 2022
1 parent 111c7e6 commit d565918
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions library/Zend/Feed/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ protected function ensureAppended()
public function saveXml()
{
// Return a complete document including XML prologue.
$doc = new DOMDocument($this->_element->ownerDocument->version,
$this->_element->ownerDocument->actualEncoding);
$doc = new DOMDocument((string) $this->_element->ownerDocument->version,
(string) $this->_element->ownerDocument->actualEncoding);
$doc->appendChild($doc->importNode($this->_element, true));
return $doc->saveXML();
}
Expand Down
2 changes: 1 addition & 1 deletion library/Zend/Feed/Reader/Extension/Atom/Entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public function getContent()
$content = $this->getDescription();
}

$this->_data['content'] = trim($content);
$this->_data['content'] = trim((string) $content);

return $this->_data['content'];
}
Expand Down

0 comments on commit d565918

Please sign in to comment.