Skip to content

Commit 1f79a62

Browse files
committed
SessionSection: removed $warnOnUndefined (BC break)
1 parent a3719ca commit 1f79a62

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/Http/SessionSection.php

-7
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@
1717
*/
1818
class SessionSection implements \IteratorAggregate, \ArrayAccess
1919
{
20-
public bool $warnOnUndefined = false;
21-
22-
2320
/**
2421
* Do not call directly. Use Session::getSection().
2522
*/
@@ -112,10 +109,6 @@ public function &__get(string $name): mixed
112109
trigger_error("Reading from \$session->$name is deprecated, use \$session->get('$name') instead", E_USER_DEPRECATED);
113110
$this->session->autoStart(true);
114111
$data = &$this->getData();
115-
if ($this->warnOnUndefined && !array_key_exists($name, $data ?? [])) {
116-
trigger_error("The variable '$name' does not exist in session section");
117-
}
118-
119112
return $data[$name];
120113
}
121114

0 commit comments

Comments
 (0)