Skip to content

Commit

Permalink
[BUGS-7554] Fix php 8.x warning in Apache Solr module
Browse files Browse the repository at this point in the history
  • Loading branch information
pwtyler committed Mar 8, 2024
1 parent 752db1e commit 9ae2bdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ protected function _makeHttpRequest($url, $options = array()) {
list($result->protocol, $result->code, $result->status_message) = explode(' ', trim(array_shift($split)), 3);
// Parse headers.
$result->headers = array();
while ($line = trim(array_shift($split))) {
while (!empty($split) && $line = trim(array_shift($split))) {
list($header, $value) = explode(':', $line, 2);
if (isset($result->headers[$header]) && $header == 'Set-Cookie') {
// RFC 2109: the Set-Cookie response header comprises the token Set-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ protected function performHttpRequest($method, $url, $timeout, $rawPost = NULL,
list($result->protocol, $result->code, $result->status_message) = explode(' ', trim(array_shift($split)), 3);
// Parse headers.
$result->headers = array();
while ($line = trim(array_shift($split))) {
while (!empty($split) && $line = trim(array_shift($split))) {
list($header, $value) = explode(':', $line, 2);
if (isset($result->headers[$header]) && $result->header == 'Set-Cookie') {
// RFC 2109: the Set-Cookie response header comprises the token Set-
Expand Down

0 comments on commit 9ae2bdd

Please sign in to comment.