-
Notifications
You must be signed in to change notification settings - Fork 5
Correct Horde_Url's toString() method #2
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
Conversation
The 523d5e5 commit resolved issues with URL parameters represented by a nested array deeper than level one by replacing the custom code with However, it also created a regression, as This created a specific issue when For example, it is used to keep the original URL in a signed format in other to later redirect to it after login. The expected query string in such case is However, using The Note, there are multiple other cases like that. It is also not clear if there are cases with classes other than There are different possible solutions. This PR attempts to address the specific issue with This, together with horde/Core#27 resolves horde/base#12. @ralflang, please review. |
I'd say this calls for unit test coverage. |
dba624a
to
58c99e4
Compare
I just added a unit test. Hopefully I did it correctly. |
With this code: $url = new Horde_Url('test?foo=1&bar=2');
$url->add('url', new Horde_Url('https://example.com/test?_t=123456&_h=Abcd123'));
print strval($url); Current result (wrong): With the PR applied (correct, same as before 523d5e5 commit): |
Specifically, properly convert Horde_Url objects in parameters values to string. Add unit test for the case when Horde_Url instance is one of parameter values.
@TDannhauer: please could you review/merge? |
Thanks for the PR and test. Your test suceeds, but others do not:
as you are deeper in the topic than me: What is your proposal to get URL testset clean again? |
Could you please tell me how exactly do you test? I need instructions on how to reproduce. Also, if you test without applying this PR, is everything clean? |
Please see horde/Core#28 also. |
Yes, but later. |
run run it from cursor & gpt-5:
with the result digested by cursor:
|
This, together with horde/Core#28 resolves horde/base#12.