PHP's parse_url fails to parse url's containing `/?`. It returns false instead of something useful. Fixes #2354