CodeIgniter Forums

Full Version: call_user_func_array() error in DB_driver.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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