Welcome Guest, Not a member yet? Register   Sign In
database/DB_driver.php
#1

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
Reply
#2

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.
Reply
#3

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
Reply
#4

(03-26-2016, 04:19 AM)syscoid Wrote: 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

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
Reply
#5

Thank You Very much...
Solve for me again...
Reply




Theme © iAndrew 2016 - Forum software by © MyBB