Warning: call_user_func_array() expects parameter 2 to be array, null given in /Applications/MAMP/htdocs/Jet/httpdocs/cakephp/cake/dispatcher.php on line 263
Here's the line 263
$output = call_user_func_array(array(&$controller, $params['action']), empty($params['pass'])? null: $params['pass']);
I'm not sure what to do here. This is part of cakephp.
call_user_func_array() error
Moderator: General Moderators
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: call_user_func_array() error
Make sure you're using the latest version of cake, not a beta or pre-release. If you are, then open a bug report. I'm not positive, but it should probably look like this:
Code: Select all
$output = call_user_func_array(array(&$controller, $params['action']), empty($params['pass']) ? array(null) : array($params['pass']));mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
Re: call_user_func_array() error
i think thats wrong, what if $params['pass'] is already an array? and the array(null) doesent work correctly.
first i had a Problem, that the call_user_func_array always expects an array as second argument, so it is not possible with this function a alone to call the function with zero arguments.
I am trying to convert my old CakePHP 0.9 to be prepared for PHP5.3 and repaired it like this:
first i had a Problem, that the call_user_func_array always expects an array as second argument, so it is not possible with this function a alone to call the function with zero arguments.
I am trying to convert my old CakePHP 0.9 to be prepared for PHP5.3 and repaired it like this:
Code: Select all
$functionname=$params['action'];
if(empty($params['pass'])) $output = $controller->$functionname();
else $output = call_user_func_array(array(&$controller, $params['action']), $params['pass']);
Re: call_user_func_array() error
Did you try using an empty array? No? Huh.rubo77 wrote:so it is not possible with this function a alone to call the function with zero arguments.
Re: call_user_func_array() error
maybe that would work too.
but array(null) is definitely not working correctly
but array(null) is definitely not working correctly