From e8b277ad0d0f9155c6301e3429c31f409016dbef Mon Sep 17 00:00:00 2001 From: Joseph Bielawski Date: Thu, 7 Sep 2023 12:57:49 +0200 Subject: [PATCH] Prevent unknown extension call --- src/SPC/command/dev/AllExtCommand.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/SPC/command/dev/AllExtCommand.php b/src/SPC/command/dev/AllExtCommand.php index f03356b4..b47bdf8e 100644 --- a/src/SPC/command/dev/AllExtCommand.php +++ b/src/SPC/command/dev/AllExtCommand.php @@ -56,10 +56,14 @@ class AllExtCommand extends BaseCommand ]; } - $style->table( - ['Extension', 'lib-depends', 'lib-suggests', 'ext-depends', 'ext-suggests', 'unix-only'], - $data - ); + if ($data === []) { + $style->warning('Unknown extension selected: ' . implode(',', $extensions)); + } else { + $style->table( + ['Extension', 'lib-depends', 'lib-suggests', 'ext-depends', 'ext-suggests', 'unix-only'], + $data + ); + } return static::SUCCESS; }