Welcome Guest, Not a member yet? Register   Sign In
Bool in session is turned into string
#19

[eluser]Unknown[/eluser]
I have also enabled db stored sessions and i was standing in front of the same problem like the thread author.

I checked the session Library and it's the str_replace of the backspace.

My quick&dirty;solution was adding a if statment with preg_match and only replace backspace if needed.

Replace in the method _serialize
Code:
$data[$key] = str_replace('\\', '{{slash}}', $val);
with
Code:
if (preg_match('/\\\\/', $val)) {
    $data[$key] = str_replace('\\', '{{slash}}', $val);
} else {
    $data[$key] = $val;
}

I also added the opposite to the _unserialize method...

Hope it's useful for somebody and i hope the ci team fix this bug also in the next release.
I also posted on the open Bug Report the thread author opened.

btw great work guys for this framework! keep on rocking ^^


Messages In This Thread
Bool in session is turned into string - by El Forum - 10-06-2009, 12:54 AM
Bool in session is turned into string - by El Forum - 10-06-2009, 01:39 AM
Bool in session is turned into string - by El Forum - 10-06-2009, 02:29 AM
Bool in session is turned into string - by El Forum - 10-06-2009, 02:32 AM
Bool in session is turned into string - by El Forum - 10-06-2009, 02:52 AM
Bool in session is turned into string - by El Forum - 10-06-2009, 02:55 AM
Bool in session is turned into string - by El Forum - 10-06-2009, 03:14 AM
Bool in session is turned into string - by El Forum - 10-06-2009, 03:39 AM
Bool in session is turned into string - by El Forum - 10-06-2009, 04:22 AM
Bool in session is turned into string - by El Forum - 10-06-2009, 08:28 AM
Bool in session is turned into string - by El Forum - 10-06-2009, 10:52 AM
Bool in session is turned into string - by El Forum - 10-06-2009, 11:01 AM
Bool in session is turned into string - by El Forum - 10-06-2009, 11:55 AM
Bool in session is turned into string - by El Forum - 10-06-2009, 04:36 PM
Bool in session is turned into string - by El Forum - 10-06-2009, 08:46 PM
Bool in session is turned into string - by El Forum - 10-07-2009, 12:39 AM
Bool in session is turned into string - by El Forum - 10-08-2009, 09:59 AM
Bool in session is turned into string - by El Forum - 10-08-2009, 11:45 AM
Bool in session is turned into string - by El Forum - 12-26-2009, 06:14 PM
Bool in session is turned into string - by El Forum - 03-29-2010, 03:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB