Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Minor optimization in DboSource::__scrubQueryData(), removing unneded…

… isset() check.
  • Loading branch information...
commit e2113e4aa280719ec3611b475fe35f26702933ba 1 parent 6a723bb
@ADmad ADmad authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 cake/libs/model/datasources/dbo_source.php
View
6 cake/libs/model/datasources/dbo_source.php
@@ -532,12 +532,12 @@ function name($data) {
return $this->cacheMethod(__FUNCTION__, $cacheKey, $this->startQuote . $data . $this->endQuote);
}
$items = explode('.', $data);
- return $this->cacheMethod(__FUNCTION__, $cacheKey,
+ return $this->cacheMethod(__FUNCTION__, $cacheKey,
$this->startQuote . implode($this->endQuote . '.' . $this->startQuote, $items) . $this->endQuote
);
}
if (preg_match('/^[\w-]+\.\*$/', $data)) { // string.*
- return $this->cacheMethod(__FUNCTION__, $cacheKey,
+ return $this->cacheMethod(__FUNCTION__, $cacheKey,
$this->startQuote . str_replace('.*', $this->endQuote . '.*', $data)
);
}
@@ -1884,7 +1884,7 @@ function resolveKey($model, $key, $assoc = null) {
*/
function __scrubQueryData($data) {
foreach (array('conditions', 'fields', 'joins', 'order', 'limit', 'offset', 'group') as $key) {
- if (!isset($data[$key]) || empty($data[$key])) {
+ if (empty($data[$key])) {
$data[$key] = array();
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.