kartik-v / yii2-export

A library to export server/db data in various formats (e.g. excel, html, pdf, csv etc.)
http://demos.krajee.com/export
Other
165 stars 126 forks source link

Closures still don't work for contentOptions #354

Closed sleptor closed 2 years ago

sleptor commented 2 years ago

Export widget throws an exception if contentOptions is closure

` Error: Closure object cannot have properties in /vendor/yiisoft/yii2/helpers/BaseArrayHelper.php:219 Stack trace:

0 vendor/kartik-v/yii2-export/src/ExportMenu.php(1405): yii\helpers\BaseArrayHelper::getValue()

`

I suppose there is a bug. Seems some changes were not merged well.

In the master: https://github.com/kartik-v/yii2-export/blob/6b313c5af225aefcf258777d9914b940e69cea99/src/ExportMenu.php#L1405

I guess this line has to be:

$format = ArrayHelper::getValue($contentOptions, 'cellFormat', null);

Related to https://github.com/kartik-v/yii2-export/pull/329

Libraries

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.