diff --git a/src/Console/LaraPnnCommand.php b/src/Console/LaraPnnCommand.php index edf8d26..c786df3 100644 --- a/src/Console/LaraPnnCommand.php +++ b/src/Console/LaraPnnCommand.php @@ -42,7 +42,8 @@ public function handle() } $eligibleModelsLength = count($eligibleModels); - $eligibleModelsColumnsLength = count(call_user_func_array('array_merge', $eligibleModelsColumns)); + + $eligibleModelsColumnsLength = count($eligibleModelsColumns) ? count(call_user_func_array('array_merge', $eligibleModelsColumns)) : 0; $this->line("\n {$this->description} | Stats for {$this->model->getTable()} table: \n"); $this->line("Eligible row: {$eligibleModelsLength}");