CodeIgniter Forums

Full Version: ERROR : allow_call_time_pass_reference
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
anybody know this erroe (show on every page) :

Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in /home/.abortive/menaralighthouse/menaralighthouse.oraystudios.com/system/libraries/Phxview.php on line 132

url : menaralighthouse.oraystudios.com

help please!!, hot to fix it.

tnx b4

El Forum

[eluser]BrianDHall[/eluser]
Easy enough, just an esoteric meaning:

Code:
// this is the right way to pass by reference, in the function definition
function foo(&$var)
{
    $var++;
}

$var = 1;

// This is ok!
foo($var);

// This, however, will throw an error
foo(&$var);

In short, you are to define a function to accept a parameter by reference - it should be by design of the function to alter directly whatever it was passed. It is NOT ok to decide something should be passed by reference at "call time", when you actually use the function.

So on your Phxview.php on line 132 I presume you will find an & symbol - simply remove it.

El Forum

[eluser]Unknown[/eluser]
Tnx to "BrianDHall".

tnx u for y'r attention 'n y'r help.

its work dude... Big Grin

once again "tnx u so much"

god bless u

Smile