Timed call forwarding fixed

Possible duplicate:
Invalid call transfer time

While it can be registered somewhere on the Internet, I cannot find a solution to my problem. Starting with the PHP 5.4 update, skipped links are removed.

Now I have a problem with this section of code, and I hope someone can see what I'm trying to do with it so that they can help me with a solution to overcome my forwarding problem.

Below is the code:

public function trigger_hooks( $command, &$client, $input ) { if( isset( $this->hooks[$command] ) ) { foreach( $this->hooks[$command] as $func ) { PS3socket::debug( 'Triggering Hook \'' . $func . '\' for \'' . $command . '\'' ); $continue = call_user_func( $func, &$this, &$client, $input ); if( $continue === FALSE ) { break; } } } } 

.

+49
function pass-by-reference public php class
Sep 07 '12 at 17:33
source share
1 answer

Only the passage time from the link is deleted. So change:

 call_user_func($func, &$this, &$client ... 

For this:

 call_user_func($func, $this, $client ... 

&$this will never be needed after PHP4 anyway.

If you absolutely need $ client to be passed by reference, instead, instead, instead of function instead of function ($ func) ( function func(&$client) { )

+91
Sep 07
source share



All Articles