Yii Widget, неожиданно) где ошибка?
<?php
$this->widget('bootstrap.widgets.TbAlert', array(
'block'=>true, // display a larger alert block?
'fade'=>true, // use transitions?
'closeText'=>'×', // close link text - if set to false, no close link is displayed
'alerts'=>array( // configurations per alert type
'success'=>array(
'block'=>true,
'fade'=>true,
'closeText'=>'×',
), // success, info, warning, error or danger
),
),
);
?>
Ошибка синтаксического анализа PHP: синтаксическая ошибка, неожиданная ')' в /dev/shm/untitled.php в строке 14
Я действительно не могу найти ошибку и смотрел ее как 100 раз. Нужно реализовать этот виджет, спасибо!
Есть 4 открывающие скобки и 4 закрывающие. Запятые в порядке, так что...?
2 ответа
Решение
<?php
$this->widget('bootstrap.widgets.TbAlert', array(
'block'=>true,
'fade'=>true,
'closeText'=>'×',
'alerts'=>array(
'success'=>array(
'block'=>true,
'fade'=>true,
'closeText'=>'×'
),
),
), // you have comma here - it's mistake
);
?>