diff --git a/modules/system/classes/extensions/source/LocalSource.php b/modules/system/classes/extensions/source/LocalSource.php index 596b2a0c9..3609ca9ae 100644 --- a/modules/system/classes/extensions/source/LocalSource.php +++ b/modules/system/classes/extensions/source/LocalSource.php @@ -23,12 +23,12 @@ public function __construct( } /** - * @throws ApplicationException + * @throws ApplicationException if the provided path doesn't exist */ public static function fromZip(string $path): array { if (!File::exists($path)) { - throw new ApplicationException('Zip not found'); + throw new ApplicationException("$path doesn't exist"); } $dir = temp_path(time()); @@ -51,11 +51,11 @@ public static function fromZip(string $path): array $sources = []; foreach ($plugins as $code => $path) { - $sources = new static(static::TYPE_PLUGIN, code: $code, path: $path); + $sources[] = new static(static::TYPE_PLUGIN, code: $code, path: $path); } foreach ($themes as $code => $path) { - $sources = new static(static::TYPE_THEME, code: $code, path: $path); + $sources[] = new static(static::TYPE_THEME, code: $code, path: $path); } return $sources;