From e315c3aeb08e31a9a2fd102768dbf566977e8869 Mon Sep 17 00:00:00 2001 From: Gabeta Soro Date: Tue, 2 Feb 2021 12:24:00 +0000 Subject: [PATCH] fix: array_merge issue --- src/Console/LaraPnnCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}");