Skip to content

Commit

Permalink
Merge pull request #2 from zoonru/fix_7.4_compatability
Browse files Browse the repository at this point in the history
fix 7.4 compatability
  • Loading branch information
Alexandr-Penkin authored Oct 17, 2022
2 parents 60d39b9 + 8b8eeb3 commit fbb33db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Commands/RunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ private static function getClassFromPath(string $path): ?PluginInterface {
require_once $path;
$pathArray = explode('/', $path);
$class = str_replace('.php', '', array_pop($pathArray));
return $class ? new ("Zoon\PyroSpy\Plugins\\$class")() : null;
if (!$class) {
return null;
}
$class = "Zoon\PyroSpy\Plugins\\$class";
return new $class();
}
}

0 comments on commit fbb33db

Please sign in to comment.