Skip to content

Commit

Permalink
[HttpClient] fix php notice on push
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Sep 10, 2019
1 parent 0fa8504 commit cd5ae93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Response/CurlResponse.php
Expand Up @@ -64,7 +64,7 @@ public function __construct(CurlClientState $multi, $ch, array $options = null,
}

if (null === $content = &$this->content) {
$content = true === $options['buffer'] ? fopen('php://temp', 'w+') : null;
$content = null === $options || true === $options['buffer'] ? fopen('php://temp', 'w+') : null;
} else {
// Move the pushed response to the activity list
if (ftell($content)) {
Expand Down Expand Up @@ -349,7 +349,7 @@ private static function parseHeaderLine($ch, string $data, array &$info, array &
return 0;
}

if ($options['buffer'] instanceof \Closure && !$content && $options['buffer']($headers)) {
if (null !== $options && $options['buffer'] instanceof \Closure && !$content && $options['buffer']($headers)) {
$content = fopen('php://temp', 'w+');
}

Expand Down

0 comments on commit cd5ae93

Please sign in to comment.