Skip to content

Commit

Permalink
Fix garden-http PHP Fatal error when running vnla docker up // VN…
Browse files Browse the repository at this point in the history
…LA-3512 (#31)

* Add fix

* Address PGoncharov's feedback
  • Loading branch information
vanilla-dbarbier authored Feb 7, 2023
1 parent 1df17d7 commit ad83733
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/HttpResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ public function offsetExists($offset): bool {
* @return mixed Can return all value types.
* @link http://php.net/manual/en/arrayaccess.offsetget.php
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset) {
$this->getBody();
$result = isset($this->body[$offset]) ? $this->body[$offset] : null;
Expand All @@ -387,6 +388,7 @@ public function offsetGet($offset) {
* @param mixed $value The value to set.
* @link http://php.net/manual/en/arrayaccess.offsetset.php
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value) {
$this->getBody();
if (is_null($offset)) {
Expand All @@ -406,6 +408,7 @@ public function offsetSet($offset, $value) {
* @param mixed $offset The offset to unset.
* @link http://php.net/manual/en/arrayaccess.offsetunset.php
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset) {
$this->getBody();
unset($this->body[$offset]);
Expand Down

0 comments on commit ad83733

Please sign in to comment.