mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Minor optimization in DboSource::__scrubQueryData(), removing unneded isset() check.
This commit is contained in:
parent
6a723bb515
commit
e2113e4aa2
1 changed files with 3 additions and 3 deletions
|
@ -532,12 +532,12 @@ class DboSource extends DataSource {
|
|||
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 @@ class DboSource extends DataSource {
|
|||
*/
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue