Bug #52617 [Opn]: call_user_func_array don't properly get parameters to a method
| From: | felipe@php.net | Date: | Tue, 17 Aug 2010 01:32:28 +0000 |
| Subject: | Bug #52617 [Opn]: call_user_func_array don't properly get parameters to a method | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-153499@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52617&edit=1
ID: 52617
Updated by: felipe@php.net
Reported by: s dot cimini at email dot it
Summary: call_user_func_array don't properly get parameters
to a method
Status: Open
Type: Bug
Package: Unknown/Other Function
Operating System: Ubuntu Server 10.04 32 bit
PHP Version: 5.3.3
Block user comment: N
New Comment:
I cannot reproduce any problem using the follow sample code:
var_dump(call_user_func_array(array(new simplexmlelement('<a><b/></a>'),
'xpath'), array('//a')));
Previous Comments:
------------------------------------------------------------------------
[2010-08-16 11:24:18] s dot cimini at email dot it
Description:
------------
The PHP version is 5.3.2 and not 5.3.3, but 5.3.2 is not present in the
combo.
When i try do execute a script that with PHP 5.2.9 on a Windows pc works
in a Ubuntu server 10.04 with PHP 5.3.2 don't work.
It appears that the second part of the function, the part relative to
the parameters, don't get the parameters to the method of the first
part.
Test script:
---------------
$db_user="root";
$db_password="password";
$db_host="localhost";
$mysqli = new mysqli($db_host, $db_user, $db_password, "database");
$query = "select id from table where name like ?";
$types="s";
$values[]="a%";
$stmt = $mysqli->prepare($query);
call_user_func_array(array($stmt, "bind_param"),
array_merge(array($types),$values));
$stmt->execute();
$stmt->bind_result($id);
while($stmt->fetch()){
echo($id."<br />");
}
$mysqli->close();
Expected result:
----------------
A list of ids.
Actual result:
--------------
Nothing and the excution don't give any errors
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52617&edit=1