bug #41807 [HttpClient] fix Psr18Client when allow_url_fopen=0 (nicolas-grekas)
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpClient] fix Psr18Client when allow_url_fopen=0
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix #41798
| License | MIT
| Doc PR | -
I didn't really know what `STREAM_IS_URL` was for, now I do :)
Commits
-------
974516133a
[HttpClient] fix Psr18Client when allow_url_fopen=0
This commit is contained in:
commit
d35c47bc7b
@ -53,7 +53,7 @@ class StreamWrapper
|
|||||||
throw new \InvalidArgumentException(sprintf('Providing a client to "%s()" is required when the response doesn\'t have any "stream()" method.', __CLASS__));
|
throw new \InvalidArgumentException(sprintf('Providing a client to "%s()" is required when the response doesn\'t have any "stream()" method.', __CLASS__));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (false === stream_wrapper_register('symfony', __CLASS__, \STREAM_IS_URL)) {
|
if (false === stream_wrapper_register('symfony', __CLASS__)) {
|
||||||
throw new \RuntimeException(error_get_last()['message'] ?? 'Registering the "symfony" stream wrapper failed.');
|
throw new \RuntimeException(error_get_last()['message'] ?? 'Registering the "symfony" stream wrapper failed.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user