fix: false < 6 is true
This commit is contained in:
@@ -32,7 +32,8 @@ class Connection
|
|||||||
throw new SqlException('SQL There was an error executing the request');
|
throw new SqlException('SQL There was an error executing the request');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((strpos($sql, "SELECT") < 6 || strpos($sql, "OUTPUT INSERTED") !== false) && (($hasOutput !== null && $hasOutput !== false) || $hasOutput === null)) {
|
$selectPos = strpos($sql, "SELECT");
|
||||||
|
if ((($selectPos !== false && $selectPos < 6) || strpos($sql, "OUTPUT INSERTED") !== false) && (($hasOutput !== null && $hasOutput !== false) || $hasOutput === null)) {
|
||||||
$rows = $statement->fetchAll($fetchMode);
|
$rows = $statement->fetchAll($fetchMode);
|
||||||
if (!is_array($rows)) {
|
if (!is_array($rows)) {
|
||||||
throw new SqlException('PDO Unable to retrieve the result');
|
throw new SqlException('PDO Unable to retrieve the result');
|
||||||
|
|||||||
Reference in New Issue
Block a user