Welcome Guest, Not a member yet? Register   Sign In
last URI paramter strangely overwritten in session only
#1

[eluser]VSz[/eluser]
Hi all,
I was trying to save URI parameters in session variables, and the last one keeps being overwritten to a CSS fila name.

I have a function like func($param1, $param2, $param3, $param4) in my controller
I saved all those in different session variables (I need for my function to know it's previous parameter list), and the last one is replaced with a css filename given in the view. If I delete the reference to css from the view, everything works just fine.
It happens both with the old php $_SESSION[] and with CI's flash session. It happens only to $param4, the other 3 are never changed. If I enter a fifth parameter in the browser's uri, it works fine.
I've tested it by echoing

echo $_SESSION['param4'];
echo $param4;
$_SESSION['param4'] = $param4;
echo $_SESSION['param4'];

it prints:

- "styles.css"
- param4's value
- param4's value

sot it had to be changed outside my function.
I never used that session variable anywhere else in my code.

It seems like a bug to me.
#2

[eluser]deck1[/eluser]
same behaviour here.

I have asigned $this->CI->uri->uri_string() to a session variable in a post_controller_constructor hook.

I get an image filename.




Theme © iAndrew 2016 - Forum software by © MyBB