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
 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC