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

1.3.6 to 1.3.7 update issue #287

Closed chathurasudarsha closed 5 years ago

chathurasudarsha commented 5 years ago

PHP Warning – yii\base\ErrorException in_array() expects parameter 2 to be array, null given

  1. in /var/www/html/adminpanel/vendor/kartik-v/yii2-export/src/ExportMenu.php at line 1227

    /**

    • Sets visible columns for export */ public function setVisibleColumns() { $columns = []; foreach ($this->columns as $key => $column) { $isActionColumn = $column instanceof ActionColumn; $isNoExport = in_array($key, $this->noExportColumns) || !in_array($key, $this->selectedColumns); if ($isActionColumn && !$isNoExport) { $this->noExportColumns[] = $key; } if (!empty($column->hiddenFromExport) || $isActionColumn || $isNoExport) { continue; } $columns[] = $column; } $this->_visibleColumns = $columns;

I suppose this because of $this->selectedColumns does not set. i reverted to v1.3.6 it's working.

Prerequisites

Steps to reproduce the issue

Expected behavior and actual behavior

When I follow those steps, I see...

I was expecting...

Environment

Browsers

Operating System

Libraries

Isolating the problem