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
This commit is contained in:
nate 2007-03-25 19:46:16 +00:00
parent f48b908ac6
commit 6afca88bb2

View file

@ -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];
}
}