From 6afca88bb26ada927c46a606c39f29dccaa1612b Mon Sep 17 00:00:00 2001 From: nate Date: Sun, 25 Mar 2007 19:46:16 +0000 Subject: [PATCH] Patching SELECT query test in DboSource::fetchAll() (Ticket #2288) git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4678 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/datasources/dbo_source.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index fcaf5d087..18df1cf87 100644 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -335,7 +335,7 @@ class DboSource extends DataSource { */ function fetchAll($sql, $cache = true, $modelName = null) { if ($cache && isset($this->_queryCache[$sql])) { - if (strpos(trim(strtolower($sql)), 'select') !== false) { + if (preg_match('/^\s*select/i', $sql)) { return $this->_queryCache[$sql]; } }