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

ExportMenu selectedColumns warning #286

Closed afortiexchange closed 5 years ago

afortiexchange commented 5 years ago

Prerequisites

Steps to reproduce the issue

  1. Run ExportMenu widget

Expected behavior and actual behavior

When I follow those steps, I see...

Warning in_array() expects parameter 2 to be array, null given 1227 $isNoExport = in_array($key, $this->noExportColumns) || !in_array($key, $this->selectedColumns);

I was expecting...

See working widget. ;-) I suppose default value for $selectedColumns property in kartik\export\ExportMenu shoukd be empty array.

vendor/kartik-v/yii2-export/src/ExportMenu.php:256 public $selectedColumns = [];

Environment

php 7.2.7-1+0~20180622080852.23+jessie~1.gbpfd8e2e Linux vbox 3.16.0-5-686-pae #1 SMP Debian 3.16.51-3+deb8u1 (2018-01-08) i686

Browsers

Operating System

Libraries

Isolating the problem

kartik-v commented 5 years ago

Duplicate to and resolved via #284.