Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.8.3

Request #6617 Cache_Lite_Function
Submitted: 2006-01-29 13:12 UTC
From: tomni Assigned: fab
Status: Closed Package: Cache_Lite (version 1.7.0beta1)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 42 - 23 = ?

 
 [2006-01-29 13:12 UTC] tomni
Description: ------------ When you call cache_lite_function function from inside an own class and function than the object that you pass to the call function isnt accessible via "global". In this case you can only work via the static mode which isnt always the proper way. Way not passing the function instance as array like in call_user_func_array to the call function. In this case you could even use "$this" as an instance. This wouldnt imply a BC break. You could still leave this old version you just would have to check for an array of string parameter? Test script: --------------- line 85 to 91 in Lite/Function.php (CVS Version) } else if (strstr($target, '->')) { // object->method // use a stupid name ($objet_123456789 because) of problems whene the object // name is the same as this var name list($object_123456789, $method) = explode('->', $target); global $$object_123456789; $result = call_user_func_array(array($$object_123456789, $method), $arguments); } else { // function Expected result: ---------------- To be able to call the "call" function via $this or self with an array argument like array($this, 'my_function')

Comments

 [2006-02-04 12:58 UTC] fab at php dot net
Can you provide a complete PHP test script of what is impossible to do ?
 [2006-02-04 13:48 UTC] tomni
Here is a this test.. http://alex2.mcm.unisg.ch/cache_test.php Cheers Thomas
 [2006-02-04 17:40 UTC] fab at php dot net
 [2006-02-04 17:40 UTC] fab at php dot net
fixed in CVS
 [2006-02-04 17:42 UTC] tomni
thx.