// Fix Db::executeS() now trigger Db::execute() method if the query begin with select|show|explain keyword
This commit is contained in:
+5
-1
@@ -401,7 +401,11 @@ abstract class DbCore
|
||||
|
||||
// This methode must be used only with queries which display results
|
||||
if (!preg_match('#^\s*(select|show|explain)\s#i', $sql))
|
||||
throw new PrestashopDatabaseException('Db->executeS() must be used only with select, show or explain queries');
|
||||
{
|
||||
if (_PS_MODE_DEV_)
|
||||
throw new PrestashopDatabaseException('Db->executeS() must be used only with select, show or explain queries');
|
||||
return $this->execute($sql, $use_cache);
|
||||
}
|
||||
|
||||
$this->result = false;
|
||||
$this->last_query = $sql;
|
||||
|
||||
Reference in New Issue
Block a user