Commit c4b8e045 by Alexander Makarov

Fixed Smarty extension "use" function to work properly in linux environment

parent 892d95a3
......@@ -10,6 +10,7 @@ namespace yii\smarty;
use Smarty;
use Yii;
use yii\helpers\ArrayHelper;
use yii\helpers\StringHelper;
use yii\helpers\Url;
use yii\web\View;
......@@ -133,7 +134,7 @@ class Extension
}
$class = $params['class'];
$alias = ArrayHelper::getValue($params, 'as', basename($params['class']));
$alias = ArrayHelper::getValue($params, 'as', StringHelper::basename($params['class']));
$type = ArrayHelper::getValue($params, 'type', 'static');
// Register the class during compile time
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment