Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed May 12, 2018
1 parent 008405d commit 1ff172e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widgets/GridView.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ protected function _initAutoColumns()
$model = reset($models);

if (!$model) {
if ($dataProvider->query && $dataProvider->query->modelClass) {
if ($dataProvider && isset($dataProvider->query) && $dataProvider->query->modelClass) {
$modelClass = $dataProvider->query->modelClass;
$model = new $modelClass();
}
Expand Down

0 comments on commit 1ff172e

Please sign in to comment.