// Allow query from Db::excuteS, to start by an open parenthese

This commit is contained in:
mDeflotte
2012-02-10 08:20:06 +00:00
parent a03f87d135
commit b115ec614a
+1 -1
View File
@@ -459,7 +459,7 @@ abstract class DbCore
$sql = $sql->build();
// This method must be used only with queries which display results
if (!preg_match('#^\s*(select|show|explain|describe)\s#i', $sql))
if (!preg_match('#^\s*\(?\s*(select|show|explain|describe)\s#i', $sql))
{
if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_)
throw new PrestaShopDatabaseException('Db->executeS() must be used only with select, show, explain or describe queries');