Skip to content
Permalink
Browse files

Its EXECUTE not EXECUCUTE

Also make the search insensitive as casing bugs are no fun.
  • Loading branch information...
markstory committed Feb 10, 2012
1 parent 0cfec52 commit 9c1fa28d601dd5391f213cfbe0284c08059166b1
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Model/Datasource/Database/Sqlserver.php
@@ -745,7 +745,7 @@ public function lastAffected($source = null) {
*/
protected function _execute($sql, $params = array(), $prepareOptions = array()) {
$this->_lastAffected = false;
if (strncasecmp($sql, 'SELECT', 6) == 0 || preg_match('/^EXEC(?:UCUTE)?\s/m', $sql) > 0) {
if (strncasecmp($sql, 'SELECT', 6) == 0 || preg_match('/^EXEC(?:UTE)?\s/mi', $sql) > 0) {
$prepareOptions += array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL);
return parent::_execute($sql, $params, $prepareOptions);
}

0 comments on commit 9c1fa28

Please sign in to comment.
You can’t perform that action at this time.