// check if PS_MODE_DEV is defined before checking its value

This commit is contained in:
mMarinetti
2011-11-22 14:32:58 +00:00
parent d06d9805cd
commit 6e9f76afb4
+2 -2
View File
@@ -403,7 +403,7 @@ abstract class DbCore
// This methode must be used only with queries which display results
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');
return $this->execute($sql, $use_cache);
}
@@ -608,4 +608,4 @@ abstract class DbCore
Db::s($sql, $use_cache);
die();
}
}
}