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 Jan 30, 2024
1 parent 7e31f8a commit cc502dc
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/Http/SessionSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
class SessionSection implements \IteratorAggregate, \ArrayAccess
{
public bool $warnOnUndefined = false;
private Session $session;
private string $name;

Expand Down Expand Up @@ -114,10 +113,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 cc502dc

Please sign in to comment.