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:
Nicolas Grekas 2021-06-24 09:56:08 +02:00
commit d35c47bc7b
1 changed files with 1 additions and 1 deletions

View File

@ -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__));
}
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.');
}