Skip to content

Commit cd687d9

Browse files
committed
SessionSection: removed $warnOnUndefined (BC break)
1 parent d210458 commit cd687d9

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

src/Http/SessionSection.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ class SessionSection implements \IteratorAggregate, \ArrayAccess
1919
{
2020
use Nette\SmartObject;
2121

22-
public bool $warnOnUndefined = false;
23-
2422
private Session $session;
2523

2624
private string $name;
@@ -104,10 +102,6 @@ public function __set(string $name, $value): void
104102
public function &__get(string $name): mixed
105103
{
106104
$data = &$this->getData(true);
107-
if ($this->warnOnUndefined && !array_key_exists($name, $data ?? [])) {
108-
trigger_error("The variable '$name' does not exist in session section");
109-
}
110-
111105
return $data[$name];
112106
}
113107

0 commit comments

Comments
 (0)