Skip to content

Commit

Permalink
Merge pull request #6 from desenvolvedorindie/master
Browse files Browse the repository at this point in the history
Fix explode to php 8 compatibility
  • Loading branch information
AntonyZ89 authored Jul 9, 2023
2 parents 9ab2255 + 24c39bb commit 119d77f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/SeederController.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ public function actionSeed($name = null)
$this->stdout("YII_ENV is set to 'prod'.\nUse seeder is not possible on production systems. use '--runOnProd' to ignore it.\n");
return ExitCode::OK;
}

$explode = explode(':', $name);
$name = $explode[0];
$function = $explode[1] ?? null;


if ($name) {
$explode = explode(':', $name);
$name = $explode[0];
$function = $explode[1] ?? null;

$seederClass = "$this->tableSeederNamespace\\{$name}TableSeeder";
if ($seeder = $this->getClass($seederClass)) {
$seeder->{$function ?? 'run'}();
Expand Down

0 comments on commit 119d77f

Please sign in to comment.