Skip to content

Commit 68a877b

Browse files
committed
SessionSection: removed $warnOnUndefined (BC break)
1 parent eb9330f commit 68a877b

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;
@@ -100,10 +98,6 @@ public function __set(string $name, $value): void
10098
public function &__get(string $name): mixed
10199
{
102100
$data = &$this->getData(true);
103-
if ($this->warnOnUndefined && !array_key_exists($name, $data ?? [])) {
104-
trigger_error("The variable '$name' does not exist in session section");
105-
}
106-
107101
return $data[$name];
108102
}
109103

0 commit comments

Comments
 (0)