mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 19:38:26 +00:00
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:
parent
f48b908ac6
commit
6afca88bb2
1 changed files with 1 additions and 1 deletions
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue