=== array() => empty()

This commit is contained in:
Alexander Kochetov
2013-05-07 19:51:29 +04:00
parent 901dabc301
commit d7df7053e0
11 changed files with 25 additions and 23 deletions

View File

@@ -251,7 +251,7 @@ class Sort extends \yii\base\Object
}
}
}
if ($this->_attributeOrders === array() && is_array($this->defaults)) {
if (empty($this->_attributeOrders) && is_array($this->defaults)) {
$this->_attributeOrders = $this->defaults;
}
}

View File

@@ -90,7 +90,7 @@ class UrlManager extends Component
*/
protected function compileRules()
{
if (!$this->enablePrettyUrl || $this->rules === array()) {
if (!$this->enablePrettyUrl || empty($this->rules)) {
return;
}
if (is_string($this->cache)) {