Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #93 from Tobion/patch-1

replace unneeded RegEx
  • Loading branch information...
commit b6a4eca784b83863fb9b69a48b8a9365d96284a7 2 parents b8033f8 + 0d9cca4
@guilhermeblanco guilhermeblanco authored
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);
}
Please sign in to comment.
Something went wrong with that request. Please try again.