From e1eb28ad549ad5a0ff0262a94b12de0649e1c842 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sat, 4 Sep 2021 13:02:37 +0200 Subject: [PATCH] SessionSection: removed $warnOnUndefined (BC break) --- src/Http/SessionSection.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Http/SessionSection.php b/src/Http/SessionSection.php index daf37bd4..97f6c503 100644 --- a/src/Http/SessionSection.php +++ b/src/Http/SessionSection.php @@ -17,7 +17,6 @@ */ class SessionSection implements \IteratorAggregate, \ArrayAccess { - public bool $warnOnUndefined = false; private Session $session; private string $name; @@ -114,10 +113,6 @@ public function &__get(string $name): mixed trigger_error("Reading from \$session->$name is deprecated, use \$session->get('$name') instead", E_USER_DEPRECATED); $this->session->autoStart(true); $data = &$this->getData(); - if ($this->warnOnUndefined && !array_key_exists($name, $data ?? [])) { - trigger_error("The variable '$name' does not exist in session section"); - } - return $data[$name]; }