Skip to content

Commit

Permalink
Avoid Notice: Undefined variable: http_response_header Solarium\Core\…
Browse files Browse the repository at this point in the history
…Client\Adapter\Http->getData()() (Line: 163)
  • Loading branch information
mkalkbrenner committed Oct 20, 2020
1 parent a435c05 commit e2162fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Added

### Fixed
- Avoid Notice: Undefined variable: http_response_header

### Changed

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Client/Adapter/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,6 @@ protected function getData($uri, $context)
$data = @file_get_contents($uri, false, $context);

// @ see https://www.php.net/manual/en/reserved.variables.httpresponseheader.php
return [$data, $http_response_header];
return [$data, $http_response_header ?? []];
}
}

0 comments on commit e2162fe

Please sign in to comment.