-
Notifications
You must be signed in to change notification settings - Fork 7.9k
http_build_query() skips Stringable params #10229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Girgias
added a commit
to Girgias/php-src
that referenced
this issue
Jan 5, 2023
The reason for this is that objects in the data set were treated like arrays and called recursively Therefore we first check if the object is stringable in which case we handle it like a scalar, otherwise we keep the existing behaviour of recursing through the object properties
Girgias
added a commit
to Girgias/php-src
that referenced
this issue
Jan 8, 2023
The reason for this is that objects in the data set were treated like arrays and called recursively Therefore we first check if the object is stringable in which case we handle it like a scalar, otherwise we keep the existing behaviour of recursing through the object properties
Girgias
added a commit
to Girgias/php-src
that referenced
this issue
Jan 13, 2023
The reason for this is that objects in the data set were treated like arrays and called recursively Therefore we first check if the object is stringable in which case we handle it like a scalar, otherwise we keep the existing behaviour of recursing through the object properties
Girgias
added a commit
to Girgias/php-src
that referenced
this issue
Jan 15, 2023
The reason for this is that objects are treated like a key:value pair, like arrays, and called recursively Therefore, if the object is Stringable and does not have any visible propertiese we handle it like a scalar. Otherwise, we keep the existing key:value behaviour of recursing through the object properties.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The following code:
Resulted in this output:
But I expected this output instead:
... as __toString() should have been implicitly called on the object. The ugly manual conversion shouldn't be necessary.
PHP Version
PHP 8.1
Operating System
Any
The text was updated successfully, but these errors were encountered: