We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e31f8a commit cc502dcCopy full SHA for cc502dc
src/Http/SessionSection.php
@@ -17,7 +17,6 @@
17
*/
18
class SessionSection implements \IteratorAggregate, \ArrayAccess
19
{
20
- public bool $warnOnUndefined = false;
21
private Session $session;
22
private string $name;
23
@@ -114,10 +113,6 @@ public function &__get(string $name): mixed
114
113
trigger_error("Reading from \$session->$name is deprecated, use \$session->get('$name') instead", E_USER_DEPRECATED);
115
$this->session->autoStart(true);
116
$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
-
121
return $data[$name];
122
}
123
0 commit comments