Skip to content

Commit cc502dc

Browse files
committed
SessionSection: removed $warnOnUndefined (BC break)
1 parent 7e31f8a commit cc502dc

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/Http/SessionSection.php

-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
*/
1818
class SessionSection implements \IteratorAggregate, \ArrayAccess
1919
{
20-
public bool $warnOnUndefined = false;
2120
private Session $session;
2221
private string $name;
2322

@@ -114,10 +113,6 @@ public function &__get(string $name): mixed
114113
trigger_error("Reading from \$session->$name is deprecated, use \$session->get('$name') instead", E_USER_DEPRECATED);
115114
$this->session->autoStart(true);
116115
$data = &$this->getData();
117-
if ($this->warnOnUndefined && !array_key_exists($name, $data ?? [])) {
118-
trigger_error("The variable '$name' does not exist in session section");
119-
}
120-
121116
return $data[$name];
122117
}
123118

0 commit comments

Comments
 (0)