|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56666 parse_str() returns empty array when filter enabled
Submitted: 2005-11-20 12:59 UTC Modified: 2005-11-28 16:34 UTC
From: Assigned: ramsey (profile)
Status: Closed Package: filter (PECL)
PHP Version: 5.1.0RC6 OS: Debian sarge
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
New email:
PHP Version: OS:


 [2005-11-20 12:59 UTC]
When the filter extension is enabled, then parse_str() returns an empty array instead of the expected values.

Reproduce code:
$args = 'foo=bar&baz=bar';
parse_str($args, $r);

Expected result:
array(2) {
  string(3) "bar"
  string(3) "bar"

Actual result:
array(0) {


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-22 09:01 UTC]
This is bug in both PHP and filter extension.
Patch can be found here:

It requires you to have ext/filter in PHP core.
(I have symlinked it in my ext/ dir :)

I get some crashes with the "string/strip" filter.
Data like '<!--' or '<br />' makes PHP crash during request shutdown.

Easy way to reproduce (with or without my patch): 
# sapi/cli/php -r 'parse_str("foo=<!--");'
 [2005-11-22 17:57 UTC]
The patch was bogus. This was broken by Derick in the filter extension itself.
 [2005-11-25 12:15 UTC]
Well, is it going to be fixed in the filter extension?
 [2005-11-28 16:34 UTC]
This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on

In case this was a website problem, the change will show
up on the website in short time.
Thank you for the report, and for helping us make PECL better.

Disregard my last message. This appears to be fixed in HEAD.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 02:01:29 2024 UTC