Skip to content

Commit

Permalink
Fixed warning about providing null instead of a string (#3663)
Browse files Browse the repository at this point in the history
* Fixing warning about providing null instead of an expected string

* fix typo

* removing temp-var
  • Loading branch information
alexh-swdev authored Nov 24, 2023
1 parent 1151717 commit 32773dd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Unserialize/Reader/Str.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ public function read($char, $prevChar)
}

if ($this->_status == self::READING_VALUE) {
if (is_null($this->_value)) {
$this->_value = $char;
return null;
}

if (strlen($this->_value) < $this->_length) {
$this->_value .= $char;
return null;
Expand Down

0 comments on commit 32773dd

Please sign in to comment.