Skip to content

Commit

Permalink
Fix model:prune error with non-class php files (#48708)
Browse files Browse the repository at this point in the history
  • Loading branch information
zlodes committed Oct 11, 2023
1 parent 5e444ac commit 7966308
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Console/PruneCommand.php
Expand Up @@ -138,10 +138,10 @@ protected function models()
return $models->reject(function ($model) use ($except) {
return in_array($model, $except);
});
})->filter(function ($model) {
return $this->isPrunable($model);
})->filter(function ($model) {
return class_exists($model);
})->filter(function ($model) {
return $this->isPrunable($model);
})->values();
}

Expand Down

0 comments on commit 7966308

Please sign in to comment.