Skip to content

Commit

Permalink
check if directory exists
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdulici committed Sep 10, 2021
1 parent 5dc3c40 commit b008e8a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Jobs/Install/FinishUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use App\Models\Module\Module;
use App\Utilities\Console;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Facades\File;

class FinishUpdate extends Job
{
Expand Down Expand Up @@ -85,6 +86,10 @@ public function getListenerTypeOfModule(): string

$updates_folder = $module->getPath() . '/Listeners/Update';

if (! File::isDirectory($updates_folder)) {
return $listener;
}

foreach ($filesystem->allFiles($updates_folder) as $file) {
$path = str_replace([$module->getPath(), '.php'], '', $file->getPathname());

Expand Down

0 comments on commit b008e8a

Please sign in to comment.