Skip to content

Conversation

@amulet1
Copy link
Contributor

@amulet1 amulet1 commented Aug 14, 2025

Highlights:

  • Process nested arrays recursively
  • Convert other values by casting to (string) (this takes care of Horde_Url)
  • Do not output consecutive numeric indexes in arrays
  • Do not skip parameters with empty values
  • Do not encode [ and ]

This also fixes the test failures mentioned in #2.

With this PR, instances of classes without __toString() will not be encoded the way http_build_query would encode them, but this is how it was before 523d5e5, anyway.

More tests should be added, specifically to test nested arrays (possible with Horde_Url), e.g.

    $url->add('x', [ 'abc', 'def', [ 'k1' => 'v1', 'k2' => 'v2 '] ];

@amulet1
Copy link
Contributor Author

amulet1 commented Aug 17, 2025

@TDannhauer Please review.

1 similar comment
@amulet1
Copy link
Contributor Author

amulet1 commented Sep 17, 2025

@TDannhauer Please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant