php.net |  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: ramsey@php.net 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
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ramsey@php.net
New email:
PHP Version: OS:

 

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

Reproduce code:
---------------
<?php
$args = 'foo=bar&baz=bar';
parse_str($args, $r);
var_dump($r);
?>

Expected result:
----------------
array(2) {
  ["foo"]=>
  string(3) "bar"
  ["baz"]=>
  string(3) "bar"
}

Actual result:
--------------
array(0) {
}

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-22 09:01 UTC] sniper@php.net
This is bug in both PHP and filter extension.
Patch can be found here:
  
  http://www.php.net/~jani/patches/filter_bug_6021.patch

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] sniper@php.net
The patch was bogus. This was broken by Derick in the filter extension itself.
 [2005-11-25 12:15 UTC] ramsey@php.net
Well, is it going to be fixed in the filter extension?
 [2005-11-28 16:34 UTC] ramsey@php.net
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 pecl.php.net.

In case this was a pecl.php.net 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-2019 The PHP Group
All rights reserved.
Last updated: Sat Feb 16 01:01:26 2019 UTC