php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40075 FILTER_CALLBACK generates strange results
Submitted: 2007-01-09 13:43 UTC Modified: 2007-01-09 14:20 UTC
From: crocodile2u at yandex dot ru Assigned:
Status: Closed Package: Filter related
PHP Version: 5.2.0 OS: Kubuntu linux 6.06
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: crocodile2u at yandex dot ru
New email:
PHP Version: OS:

 

 [2007-01-09 13:43 UTC] crocodile2u at yandex dot ru
Description:
------------
Specifying a simple callback for the filter_var_array function leads to invalid results.

Reproduce code:
---------------
function t($v){return $v;}
var_dump(filter_var_array(array("x"=>"s"), array("x"=>array("filter"=>FILTER_CALLBACK, "options"=>"t"))));

Expected result:
----------------
array(1) {
  ["x"]=>
  string(1) "s"
}

Actual result:
--------------
array(1) {
  ["x"]=>
  string(1) "("
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-09 14:13 UTC] pajoye@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.2-win32-latest.zip


 [2007-01-09 14:20 UTC] crocodile2u at yandex dot ru
Just installed the latest snapshot. Everything works like a charm. Thanks a lot.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 19:01:30 2024 UTC