Skip to content

Commit

Permalink
SessionSection: removed $warnOnUndefined (BC break)
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 5, 2024
1 parent cecd948 commit e7d1aa8
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/Http/SessionSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
*/
class SessionSection implements \IteratorAggregate, \ArrayAccess
{
public bool $warnOnUndefined = false;


/**
* Do not call directly. Use Session::getSection().
*/
Expand Down Expand Up @@ -112,10 +109,6 @@ public function &__get(string $name): mixed
trigger_error("Reading from \$session->$name is deprecated, use \$session->get('$name') instead", E_USER_DEPRECATED);
$this->session->autoStart(true);
$data = &$this->getData();
if ($this->warnOnUndefined && !array_key_exists($name, $data ?? [])) {
trigger_error("The variable '$name' does not exist in session section");
}

return $data[$name];
}

Expand Down

0 comments on commit e7d1aa8

Please sign in to comment.