diff --git a/inc/class-phpcs-runner.php b/inc/class-phpcs-runner.php index 75b528a0..e015ce01 100644 --- a/inc/class-phpcs-runner.php +++ b/inc/class-phpcs-runner.php @@ -123,7 +123,7 @@ protected function get_args(): array { */ public function run() { // Backup the original command line arguments. - $orig_cmd_args = $_SERVER['argv']; + $orig_cmd_args = $_SERVER['argv'] ?? []; // Create the default arguments for PHPCS. $defaults = [ @@ -225,4 +225,4 @@ protected function reset_php_codesniffer_config(): void { $overridden_defaults->setAccessible( false ); } } -} \ No newline at end of file +}