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 6cdd4a3 commit 008405d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/widgets/GridView.php
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,10 @@ protected function _initAutoColumns()
$model = reset($models);

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


Expand Down

0 comments on commit 008405d

Please sign in to comment.