Skip to content

Commit

Permalink
replace unneeded RegEx
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobion committed Jan 16, 2012
1 parent b8033f8 commit 0d9cca4
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 0d9cca4

Please sign in to comment.