Skip to content

Fixed - Lifetime update syntax error #13309 #19634

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/internal/Magento/Framework/Cache/Backend/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
* ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
*/

/**
* Database cache backend
*/
namespace Magento\Framework\Cache\Backend;

/**
* Database cache backend.
*/
class Database extends \Zend_Cache_Backend implements \Zend_Cache_Backend_ExtendedInterface
{
/**
Expand Down Expand Up @@ -139,7 +139,7 @@ protected function _getTagsTable()
*
* Note : return value is always "string" (unserialization is done by the core not by the backend)
*
* @param string $id Cache id
* @param string $id Cache id
* @param boolean $doNotTestCacheValidity If set to true, the cache validity won't be tested
* @return string|false cached datas
*/
Expand Down Expand Up @@ -432,7 +432,7 @@ public function touch($id, $extraLifetime)
return $this->_getConnection()->update(
$this->_getDataTable(),
['expire_time' => new \Zend_Db_Expr('expire_time+' . $extraLifetime)],
['id=?' => $id, 'expire_time = 0 OR expire_time>' => time()]
['id=?' => $id, 'expire_time = 0 OR expire_time>?' => time()]
);
} else {
return true;
Expand Down