mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-11 19:20:01 +08:00
=== array() => empty()
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user