Skip to content
Browse files

Merge pull request #93 from Tobion/patch-1

replace unneeded RegEx
  • Loading branch information...
2 parents b8033f8 + 0d9cca4 commit b6a4eca784b83863fb9b69a48b8a9365d96284a7 @guilhermeblanco guilhermeblanco committed Jan 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php
View
4 lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php
@@ -72,8 +72,8 @@ protected function execute(Console\Input\InputInterface $input, Console\Output\O
throw new \LogicException("Option 'depth' must contains an integer value");
}
- if (preg_match('/^select/i', $sql)) {
- $resultSet = $conn->fetchAll($sql);
+ if (stripos($sql, 'select') === 0) {
+ $resultSet = $conn->fetchAll($sql);
} else {
$resultSet = $conn->executeUpdate($sql);
}

0 comments on commit b6a4eca

Please sign in to comment.
Something went wrong with that request. Please try again.