From 29758cd9522e4e450258faf81ea2c7b73f375cbe Mon Sep 17 00:00:00 2001 From: fredericgboutin-yapla Date: Thu, 22 Dec 2022 09:51:29 -0500 Subject: [PATCH] Fix when the date is the same as stored update returns 0 if the data being updated matches the one in the database, which produces a `false` return, which in turn triggers a warning in Zend_Session::writeClose - session_write_close() Co-Authored-By: Pablo Guzman <26124783+Dringho@users.noreply.github.com> --- .../library/Zend/Session/SaveHandler/DbTable.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/zend-session/library/Zend/Session/SaveHandler/DbTable.php b/packages/zend-session/library/Zend/Session/SaveHandler/DbTable.php index cdfde927d..7abddeb22 100644 --- a/packages/zend-session/library/Zend/Session/SaveHandler/DbTable.php +++ b/packages/zend-session/library/Zend/Session/SaveHandler/DbTable.php @@ -348,9 +348,8 @@ public function write($id, $data) if (count($rows)) { $data[$this->_lifetimeColumn] = $this->_getLifetime($rows->current()); - if ($this->update($data, $this->_getPrimary($id, self::PRIMARY_TYPE_WHERECLAUSE))) { - $return = true; - } + $this->update($data, $this->_getPrimary($id, self::PRIMARY_TYPE_WHERECLAUSE)); + $return = true; } else { $data[$this->_lifetimeColumn] = $this->_lifetime;