php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10257 value function_name is changed
Submitted: 2001-04-10 09:34 UTC Modified: 2001-07-15 13:45 UTC
From: dwagner at innnet dot de Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.4pl1 OS: doesn't matter
Private report: No CVE-ID: None
 [2001-04-10 09:34 UTC] dwagner at innnet dot de
when you call the function call_user_func_array, the value 
of the first parameter is changed hardcore to lowercase so 
every reference to this value is changed too. e.g.


$String = "TEstFunction";
$Function= $String;

call_user_func_array($Function, array("a","b"));

echo $String." ".$Function;

will echo:
testfunction testfunction

this is really ugly if you use the string afterwards for 
file-issues or variable-issues where the spelling does 
matter ;-(

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-29 05:45 UTC] jmoore@php.net
This is a script engine issue.. another shallow copy problem, although in a way I havnt seen it before.

- James
 [2001-07-15 13:45 UTC] zeev@php.net
This actually isn't a shallow copy issue, the shallow copy is very specific and limited.

This is fixed in the CVS - thanks for the report!
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 02:01:28 2024 UTC