Commit 0d9cca43 authored by Tobias Schultze's avatar Tobias Schultze

replace unneeded RegEx

parent b8033f8e
...@@ -72,7 +72,7 @@ EOT ...@@ -72,7 +72,7 @@ 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