CodeIgniter Forums
call_user_func_array() error in DB_driver.php - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: call_user_func_array() error in DB_driver.php (/thread-27856.html)



call_user_func_array() error in DB_driver.php - El Forum - 02-22-2010

[eluser]mgnsrsn[/eluser]
Hi,

there seems to be a problem in database/DB_driver.php in the call_function($function)

Using PHP 5.3.1 and CI 1.7.2 I get

call_user_func_array() expects parameter 2 to be array, null given

I had to change row 1013 to be

Code:
$args = (func_num_args() > 1) ? array_splice(func_get_args(), 1) : null;

  if($args == null)
    return call_user_func($function);
  else
    return call_user_func_array($function, $args);

to make it work.

Regards

Magnus