diff --git a/framework/console/controllers/AssetController.php b/framework/console/controllers/AssetController.php index 1977403ed9..a865116f74 100644 --- a/framework/console/controllers/AssetController.php +++ b/framework/console/controllers/AssetController.php @@ -10,7 +10,6 @@ namespace yii\console\controllers; use Yii; use yii\console\Exception; use yii\console\Controller; -use yii\helpers\ArrayHelper; use yii\helpers\Console; use yii\helpers\FileHelper; use yii\helpers\VarDumper; @@ -332,7 +331,7 @@ class AssetController extends Controller if (isset($bundles[$name])) { if (!$this->isBundleExternal($bundles[$name])) { foreach ($bundles[$name]->$type as $file) { - $file = ArrayHelper::toArray($file); + $file = (array) $file; $inputFiles[] = $bundles[$name]->basePath . '/' . $file[0]; } } diff --git a/framework/web/AssetBundle.php b/framework/web/AssetBundle.php index a40ebc77fc..c5171dc13d 100644 --- a/framework/web/AssetBundle.php +++ b/framework/web/AssetBundle.php @@ -152,7 +152,7 @@ class AssetBundle extends Object $view->registerJsFile($manager->getAssetUrl($this, $js), $this->jsOptions); } foreach ($this->css as $css) { - $css = ArrayHelper::toArray($css); + $css = (array) $css; $file = array_shift($css); $options = ArrayHelper::merge($this->cssOptions, $css); $view->registerCssFile($manager->getAssetUrl($this, $file), $options); @@ -178,7 +178,7 @@ class AssetBundle extends Object } } foreach ($this->css as $i => $css) { - $css = ArrayHelper::toArray($css); + $css = (array) $css; $file = array_shift($css); if (Url::isRelative($file)) { $css = ArrayHelper::merge($this->cssOptions, $css);