// check if PS_MODE_DEV is defined before checking its value
This commit is contained in:
+2
-2
@@ -403,7 +403,7 @@ abstract class DbCore
|
|||||||
// This methode must be used only with queries which display results
|
// This methode must be used only with queries which display results
|
||||||
if (!preg_match('#^\s*(select|show|explain)\s#i', $sql))
|
if (!preg_match('#^\s*(select|show|explain)\s#i', $sql))
|
||||||
{
|
{
|
||||||
if (_PS_MODE_DEV_)
|
if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_)
|
||||||
throw new PrestashopDatabaseException('Db->executeS() must be used only with select, show or explain queries');
|
throw new PrestashopDatabaseException('Db->executeS() must be used only with select, show or explain queries');
|
||||||
return $this->execute($sql, $use_cache);
|
return $this->execute($sql, $use_cache);
|
||||||
}
|
}
|
||||||
@@ -608,4 +608,4 @@ abstract class DbCore
|
|||||||
Db::s($sql, $use_cache);
|
Db::s($sql, $use_cache);
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user