Bug #17026 [Ver]: deprecated function
| From: | daniel dot oconnor at gmail dot com | Date: | Tue, 31 Aug 2010 14:52:28 +0000 |
| Subject: | Bug #17026 [Ver]: deprecated function | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-4724@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=17026&edit=1
ID: 17026
Updated by: daniel.oconnor@gmail.com
Reported By: lukas dot emile at gmail dot com
Summary: deprecated function
Status: Verified
Type: Bug
Package: MDB2_TableBrowser
Operating System: linux
Package Version: 0.1.1
PHP Version: 5.1.3
-Assigned To: tewolde
+Assigned To: olleolleolle
Roadmap Versions:
New Comment:
-Assigned To: tewolde
+Assigned To: olleolleolle
I applied the fixes to public vs private; but I'll be honest, I didn't
easily understand what the old code was doing to assess if your patch is
functionality equivalent.
Since there aren't unit tests... :S
Previous Comments:
------------------------------------------------------------------------
[2010-08-08 16:18:39] olleolleolle
Inspired by the list at
http://test.pear.php.net/unit-test-results/deprecated.txt
I tried to
make a better version of the involved call_user* usages.
------------------------------------------------------------------------
[2010-08-08 16:17:29] olleolleolle
Added #patch
bug:17026;patch:MDB2_TB_call_user_func_array.diff;revision:1281284249;.
------------------------------------------------------------------------
[2010-01-23 03:30:31] doconnor
-Type: Feature/Change Request
+Type: Bug
-Assigned To:
+Assigned To: tewolde
------------------------------------------------------------------------
[2010-01-23 03:29:41] doconnor
-Status: Open
+Status: Verified
call_user_func($obj, $method) seems like a plan - as of php5, using & to
pass by reference is redundant
------------------------------------------------------------------------
[2010-01-22 08:46:56] lukas
Description:
------------
I got this message when using the "addFilter" method.
Notice: call_user_method() [function.call-user-method]: This
function is deprecated, use the call_user_func variety
with the array(&$obj, "method") syntax instead in
/mnt/167/sdb/9/d/t.b.t/include/MDB2/TableBrowser/Single.ph
p on
line 149
149. return call_user_method($method, $obj, $params[0],
$params[1], $params[2],
150. $params[3], $params[4], $params[5],
$params[6], $params[7]);
It seems better to use :
149. return call_user_func_array(array(&$obj, $method),
$params);
Test script:
---------------
see description
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=17026&edit=1