Skip to content

Commit

Permalink
Fix NULL warning in PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Mar 14, 2021
1 parent 0f37e1a commit 5cec7b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ HTTP protocol support for the XP Framework ChangeLog

## ?.?.? / ????-??-??

## 10.0.1 / 2021-03-14

* Fixed *stristr(): Passing null to parameter 1 ($haystack) of type string
is deprecated* in PHP 8.1
(@thekid)

## 10.0.0 / 2020-04-10

* Implemented xp-framework/rfc#334: Drop PHP 5.6:
Expand Down
2 changes: 1 addition & 1 deletion src/main/php/peer/http/HttpResponse.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function __construct(InputStream $stream, $chunked= true) {
do { $this->readHeader(); } while (100 === $this->statuscode);

// Check for chunked transfer encoding
$this->chunked= $chunked && (bool)stristr($this->getHeader('Transfer-Encoding'), 'chunked');
$this->chunked= $chunked && (bool)stristr($this->getHeader('Transfer-Encoding') ?? '', 'chunked');
}

/**
Expand Down

0 comments on commit 5cec7b5

Please sign in to comment.