|  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
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
18 - 3 = ?
Subscribe to this entry?

 [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 23 03:01:28 2024 UTC