yii2-bootstrap
yii2-bootstrap copied to clipboard
Collapse: If content is not an array, footer gets ignored
What steps will reproduce the problem?
Create a Collapse widget with non-array content and set footer
$items[] = [
'label' => 'Label',
'content' => 'Test',
'footer' => 'Footer'
];
What's expected?
Display content as-is along with the specified footer
What do you get instead?
Footer only gets displayed, when content is an array: https://github.com/yiisoft/yii2-bootstrap/blob/master/src/Collapse.php#L227
Additional info
| Q | A |
|---|---|
| Yii-Bootstrap vesion | 2.0.11 |
| Yii vesion | 2.0.43 |
| PHP version | 7.4 |
| Operating system | Linux |
The change came with: https://github.com/yiisoft/yii2-bootstrap/commit/599d60c376eaf9dedac0b8b5f48099beabefbe5b - before that, footer seemed unsupported.
Maybe footer could be supported for both variants, regardles of content's type?