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 Dec 11, 2023
1 parent ed0d360 commit e1eb28a
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 e1eb28a

Please sign in to comment.