diff --git a/src/Http/SessionSection.php b/src/Http/SessionSection.php index 504a3fd0..e117df27 100644 --- a/src/Http/SessionSection.php +++ b/src/Http/SessionSection.php @@ -17,9 +17,6 @@ */ class SessionSection implements \IteratorAggregate, \ArrayAccess { - public bool $warnOnUndefined = false; - - /** * Do not call directly. Use Session::getSection(). */ @@ -112,10 +109,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]; }