Skip to content

Commit

Permalink
fix null value in session
Browse files Browse the repository at this point in the history
The null value may be 0 in the session.
Supports the case of 0
  • Loading branch information
yuichiis committed Apr 16, 2020
1 parent 6852629 commit 719e7e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Rindow/Web/Session/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ protected function onAccess()
return;
$this->connected = true;
$old = $this->session->get($this->name);
if($old!==null) {
if($old) {
$this->dict = $old;
} else {
$this->dict = new Dict();
}

$this->session->set($this->name,$this->dict);
}

Expand Down Expand Up @@ -201,4 +202,4 @@ public function drop()
$this->session->remove($this->name);
$this->name = null;
}
}
}

0 comments on commit 719e7e8

Please sign in to comment.