Welcome Guest, Not a member yet? Register   Sign In
Object in session in MY_Controller clears the session completely.
#7

[eluser]dakipro[/eluser]
This is getting weirder and weirder. Even arrays that contain array that contain string with backslash "\" won't work Sad
When this is in session all works:
Code:
Array
(
    [session_id] => fddf9b4f2b268cec21c6d17d7bdad3c9
    [ip_address] => 127.0.0.1
    [user_agent] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Geck
    [last_activity] => 1305708475
    [languages_active] => Array
        (
            [0] => Array
                (
                    [id] => 2
                    [lang_ext] => sr
                    [mainObjName] => modelsLanguage
                )

        )

    [languages_active1] => adactiv\eLangsArr ///This line works
    [languages_count] => 1
)

But this doesn't

Code:
Array
(
    [session_id] => fddf9b4f2b268cec21c6d17d7bdad3c9
    [ip_address] => 127.0.0.1
    [user_agent] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Geck
    [last_activity] => 1305708475
    [languages_active] => Array
        (
            [0] => Array
                (
                    [id] => 2
                    [lang_ext] => sr
                    [mainObjName] => models\Language  //Nested array with backslass, doesnt' work
                )

        )

    [languages_active1] => adactiveLangsArr
    [languages_count] => 1
)

Nor does this:


Code:
Array
(
    [session_id] => fddf9b4f2b268cec21c6d17d7bdad3c9
    [ip_address] => 127.0.0.1
    [user_agent] => Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Geck
    [last_activity] => 1305708475
    [languages_active] => Array
        (
            [0] => Array
                (
                    [id] => 2
                    [lang_ext] => sr
                    [mainOb\jName] => modelsLanguage//Nested array with backslass, doesnt' work
                )

        )

    [languages_active1] => adactiveLangsArr
    [languages_count] => 1
)
All above are plain php arrays, no objects, no specific data, just plain backslash in multidimensional array.
Not sure if anyone encored this so far, but this is very very unreliable behavior for me. Not sure if this has to do something with my machine and my settings, this same example works fine when I try plain sessions on same server. I'm switching sessions engine for now to something else, but to be honest I'm getting a bit scared now.
Hopefully someone can confirm similar behavior.
Cheers


Messages In This Thread
Object in session in MY_Controller clears the session completely. - by El Forum - 05-18-2011, 03:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB