Skip to content

Commit

Permalink
Merge pull request #93 from Tobion/patch-1
Browse files Browse the repository at this point in the history
replace unneeded RegEx
  • Loading branch information
guilhermeblanco committed Jan 16, 2012
2 parents b8033f8 + 0d9cca4 commit b6a4eca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/DBAL/Tools/Console/Command/RunSqlCommand.php
Expand Up @@ -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);
}
Expand Down

0 comments on commit b6a4eca

Please sign in to comment.