Skip to content

session class: inconsistency on get() between document and code #330

Description

@takekoshinet

on the document:
https://github.com/bcit-ci/CodeIgniter4/blob/develop/user_guide_src/source/libraries/sessions.rst

.. important:: The get() method WILL return flashdata items.

and

.. important:: The get() method will NOT return tempdata items.

on the source code:
https://github.com/bcit-ci/CodeIgniter4/blob/develop/system/Session/Session.php#L432

		$userdata = [];
		$_exclude = array_merge(
				['__ci_vars'], $this->getFlashKeys(), $this->getTempKeys()
		);


		foreach (array_keys($_SESSION) as $key)
		{
			if (! in_array($key, $_exclude, true))
			{
				$userdata[$key] = $_SESSION[$key];
			}
		}
		return $userdata;

There are any wrong. Perhaps, the first.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions