database/DB_driver.php - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: database/DB_driver.php (/showthread.php?tid=64787) |
database/DB_driver.php - syscoid - 03-25-2016 hello, can given me solution for this problem... I running codeigniter version 2.1.3 & php Version 7.0.4 with Apache 2.0 Handler 1 question problem on error message like this: A PHP Error was encountered Severity: Notice Message: Only variables should be passed by reference Filename: database/DB_driver.php Line Number: 1017 But running with php Version 5.6 its no problem Can given me solution & fixing the problem? Thanks you RE: database/DB_driver.php - michalsn - 03-26-2016 Update to CI3 - it's the only proper way to solve this. If you want stick with CI2 (not a good idea - this version isn't supported anymore), remove pass by reference in system/database/DB_driver.php (line 1017). But you will notice more and more problems like that in the future, so one more time - update to CI3. RE: database/DB_driver.php - syscoid - 03-26-2016 Maybe CI2 not support for DB_driver.php or any bugs on CI2? because for update & migrate to CI3 many changes the controller we handle it if there is no other solution than to update CI3? Thanks RE: database/DB_driver.php - AresU - 03-27-2016 (03-26-2016, 04:19 AM)syscoid Wrote: Maybe CI2 not support for DB_driver.php or any bugs on CI2? This so Simple... open database/DB_driver.php change & comment the function call_function($function) function call_function($function) { $driver = ($this->dbdriver == 'postgre') ? 'pg_' : $this->dbdriver.'_'; if (FALSE === strpos($driver, $function)) { $function = $driver.$function; } if ( ! function_exists($function)) { if ($this->db_debug) { return $this->display_error('db_unsupported_function'); } return FALSE; } else { $args = (func_num_args() > 1) ? array_splice(func_get_args(), 1) : null; if (is_null($args)) { return call_user_func($function); } else { return call_user_func_array($function, $args); } } } replace with This : public function call_function($function) { $driver = ($this->dbdriver === 'postgre') ? 'pg_' : $this->dbdriver.'_'; if (FALSE === strpos($driver, $function)) { $function = $driver.$function; } if ( ! function_exists($function)) { return ($this->db_debug) ? $this->display_error('db_unsupported_function') : FALSE; } return (func_num_args() > 1) ? call_user_func_array($function, array_slice(func_get_args(), 1)) : call_user_func($function); } The function work for me... AresU RE: database/DB_driver.php - syscoid - 03-28-2016 Thank You Very much... Solve for me again... |