From 719e7e818c47b676eecab27df8d3b9f33341fcf0 Mon Sep 17 00:00:00 2001 From: Yuichi Ishikawa Date: Thu, 16 Apr 2020 15:00:03 +0900 Subject: [PATCH] fix null value in session The null value may be 0 in the session. Supports the case of 0 --- src/Rindow/Web/Session/Container.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Rindow/Web/Session/Container.php b/src/Rindow/Web/Session/Container.php index f0f69ff..5904e51 100644 --- a/src/Rindow/Web/Session/Container.php +++ b/src/Rindow/Web/Session/Container.php @@ -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); } @@ -201,4 +202,4 @@ public function drop() $this->session->remove($this->name); $this->name = null; } -} \ No newline at end of file +}