{"shas":[["03c7cfed5e12487d1ff6dda73423b768150b3176","96f164ad4d9b2b0dacf8ebee2bb1eeb3aa69adf1@smarterspam.com","UrlGenerator no longer appends '?' if query string is empty","Eric Clemmons"],["18894762eefc9a81fb9829baa1f23ffbca5bf6d8","d4f8dcd89cfe40276c0fbf336903f4a05ab082c9@gmail.com","merged branch ericclemmons/fix-router-generator-empty-query-string (PR #1773)\n\nCommits\n-------\n\n03c7cfe UrlGenerator no longer appends '?' if query string is empty\n\nDiscussion\n----------\n\nUrlGenerator no longer appends '?' if query string is empty\n\nIf you generate a URL using null parameters (`array('foo' => null, 'bar' => null')`), `http_build_query` returns an empty string, resulting in a trailing `?` at the end of the generated URL.\n\nThis fixes that so that, if there are `$extra` params & `http_build_query` is empty, the URL is no longer appended.\n\n---------------------------------------------------------------------------\n\nby fabpot at 2011/07/22 10:15:26 -0700\n\nCan you add unit tests?\n\n---------------------------------------------------------------------------\n\nby ericclemmons at 2011/07/22 10:52:21 -0700\n\nYes sir, will do.\n\n-Eric Clemmons\n Sent from my iPad Nano\n\nOn Jul 22, 2011, at 12:15 PM, fabpot<reply@reply.github.com> wrote:\n\n> Can you add unit tests?\n>\n> --\n> Reply to this email directly or view it on GitHub:\n> https://github.com/symfony/symfony/pull/1773#issuecomment-1633515\n\n---------------------------------------------------------------------------\n\nby ericclemmons at 2011/07/22 11:55:30 -0700\n\n**Added passing test.**\n\nCurrently `master` fails test:\n\n```\n1) Symfony\\Tests\\Component\\Routing\\Generator\\UrlGeneratorTest::testUrlWithNullExtraParameters\nFailed asserting that two strings are equal.\n--- Expected\n+++ Actual\n@@ @@\n-http://localhost/app.php/testing\n+http://localhost/app.php/testing?\n\n//tests/Symfony/Tests/Component/Routing/Generator/UrlGeneratorTest.php:114\n```","Fabien Potencier"]],"ref":"refs/heads/master","size":2,"head":"18894762eefc9a81fb9829baa1f23ffbca5bf6d8","push_id":37397835}