Skip to content

Commit

Permalink
Merge pull request #5858 from kenjis/fix-publisher-discover
Browse files Browse the repository at this point in the history
fix: Publisher::discover() loads incorrect classname
  • Loading branch information
kenjis authored Apr 6, 2022
2 parents ecc7317 + 926fc6e commit 534aa4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/Publisher/Publisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ final public static function discover(string $directory = 'Publishers'): array

// Loop over each file checking to see if it is a Publisher
foreach (array_unique($files) as $file) {
$className = $locator->findQualifiedNameFromPath($file);
$className = $locator->getClassname($file);

if (is_string($className) && class_exists($className) && is_a($className, self::class, true)) {
if ($className !== '' && class_exists($className) && is_a($className, self::class, true)) {
self::$discovered[$directory][] = new $className();
}
}
Expand Down

0 comments on commit 534aa4e

Please sign in to comment.