Commit bce562f0 authored by Rémi Gaillard's avatar Rémi Gaillard

// rtrim ; on Db::getRow() / Db::getValue() in order to be sure that the limit...

// rtrim ; on Db::getRow() / Db::getValue() in order to be sure that the limit can be applied and the cursor can be closed after the query
parent e3d766de
......@@ -547,7 +547,7 @@ abstract class DbCore
if ($sql instanceof DbQuery)
$sql = $sql->build();
$sql .= ' LIMIT 1';
$sql = rtrim($sql, ';').' LIMIT 1';
$this->result = false;
$this->last_query = $sql;
if ($use_cache && $this->is_cache_enabled && ($result = Cache::getInstance()->get(Tools::encryptIV($sql))) !== false)
......
......@@ -26,6 +26,6 @@
function fix_download_product_feature_active()
{
if (Db::getInstance()->getValue('SELECT COUNT(id_product_download) FROM `'._DB_PREFIX_.'product_download` WHERE `active` = 1 ;') > 0)
if (Db::getInstance()->getValue('SELECT COUNT(id_product_download) FROM `'._DB_PREFIX_.'product_download` WHERE `active` = 1') > 0)
Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET `value` = 1 WHERE `name` LIKE \'PS_VIRTUAL_PROD_FEATURE_ACTIVE\'');
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment