Skip to content

Commit 358391a

Browse files
committed
SessionSection: removed $warnOnUndefined (BC break)
1 parent afc9431 commit 358391a

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/Http/SessionSection.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
*/
1919
class SessionSection implements \IteratorAggregate, \ArrayAccess
2020
{
21-
public bool $warnOnUndefined = false;
22-
23-
2421
/**
2522
* Do not call directly. Use Session::getSection().
2623
*/
@@ -113,10 +110,6 @@ public function &__get(string $name): mixed
113110
trigger_error("Reading from \$session->$name is deprecated, use \$session->get('$name') instead", E_USER_DEPRECATED);
114111
$this->session->autoStart(true);
115112
$data = &$this->getData();
116-
if ($this->warnOnUndefined && !array_key_exists($name, $data ?? [])) {
117-
trigger_error("The variable '$name' does not exist in session section");
118-
}
119-
120113
return $data[$name];
121114
}
122115

0 commit comments

Comments
 (0)