diff --git a/packages/zend-session/library/Zend/Session/SaveHandler/DbTable.php b/packages/zend-session/library/Zend/Session/SaveHandler/DbTable.php index f2360567d..13b0f6bc2 100644 --- a/packages/zend-session/library/Zend/Session/SaveHandler/DbTable.php +++ b/packages/zend-session/library/Zend/Session/SaveHandler/DbTable.php @@ -337,8 +337,6 @@ public function read($id) */ public function write($id, $data) { - $return = false; - $data = array($this->_modifiedColumn => time(), $this->_dataColumn => (string) $data); @@ -346,36 +344,29 @@ 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; if ($this->insert(array_merge($this->_getPrimary($id, self::PRIMARY_TYPE_ASSOC), $data))) { - $return = true; + return true; } } - return $return; + return false; } /** * Destroy session * * @param string $id - * @return boolean + * @return true */ public function destroy($id) { - $return = false; - - if ($this->delete($this->_getPrimary($id, self::PRIMARY_TYPE_WHERECLAUSE))) { - $return = true; - } - - return $return; + $this->delete($this->_getPrimary($id, self::PRIMARY_TYPE_WHERECLAUSE)); + return true; } /**