diff options
Diffstat (limited to 'user_guide_src')
-rw-r--r-- | user_guide_src/source/installation/upgrade_300.rst | 15 | ||||
-rw-r--r-- | user_guide_src/source/libraries/sessions.rst | 8 |
2 files changed, 21 insertions, 2 deletions
diff --git a/user_guide_src/source/installation/upgrade_300.rst b/user_guide_src/source/installation/upgrade_300.rst index 497dc7263..78333c9a3 100644 --- a/user_guide_src/source/installation/upgrade_300.rst +++ b/user_guide_src/source/installation/upgrade_300.rst @@ -168,6 +168,21 @@ that you should make: `Session Metadata <../libraries/sessions.html#accessing-session-metadata>`_ if your application relies on those values. + - Check ``unset_userdata()`` usage + + Previously, this method used to accept an associative array of + ``'key' => 'dummy value'`` pairs for unsetting multiple keys. That + however makes no sense and you now have to pass *only* the keys, as + the elements of an array. + + :: + + // Old + $this->session->unset_userdata(array('item' => '', 'item2' => '')); + + // New + $this->session->unset_userdata(array('item', 'item2')); + Finally, if you have written a Session extension, you must now move it to the *application/libraries/Session/* directory, although chances are that it will now also have to be re-factored. diff --git a/user_guide_src/source/libraries/sessions.rst b/user_guide_src/source/libraries/sessions.rst index 6395c0622..91dafdee8 100644 --- a/user_guide_src/source/libraries/sessions.rst +++ b/user_guide_src/source/libraries/sessions.rst @@ -203,12 +203,16 @@ session data array:: $this->session->unset_userdata('some_name'); -This method also accepts an associative array of items to unset:: +This method also accepts an array of item keys to unset:: - $array_items = array('username' => '', 'email' => ''); + $array_items = array('username', 'email'); $this->session->unset_userdata($array_items); +.. note:: In previous versions, the ``unset_userdata()`` method used + to accept an associative array of ``key => 'dummy value'`` + pairs. This is no longer supported. + Flashdata ========= |