Commit b6a4eca7 authored by Guilherme Blanco's avatar Guilherme Blanco

Merge pull request #93 from Tobion/patch-1

replace unneeded RegEx
parents b8033f8e 0d9cca43
...@@ -72,8 +72,8 @@ EOT ...@@ -72,8 +72,8 @@ EOT
throw new \LogicException("Option 'depth' must contains an integer value"); throw new \LogicException("Option 'depth' must contains an integer value");
} }
if (preg_match('/^select/i', $sql)) { if (stripos($sql, 'select') === 0) {
$resultSet = $conn->fetchAll($sql); $resultSet = $conn->fetchAll($sql);
} else { } else {
$resultSet = $conn->executeUpdate($sql); $resultSet = $conn->executeUpdate($sql);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment