diff --git a/spark b/spark index f8febc9a1fce..9a5a5db90284 100755 --- a/spark +++ b/spark @@ -25,7 +25,7 @@ define('SPARKED', true); // Refuse to run when called from php-cgi if (strpos(PHP_SAPI, 'cgi') === 0) { - die("The cli tool is not supported when running php-cgi. It needs php-cli to function!\n\n"); + exit("The cli tool is not supported when running php-cgi. It needs php-cli to function!\n\n"); } // Path to the front controller diff --git a/system/HTTP/IncomingRequest.php b/system/HTTP/IncomingRequest.php index c1362cf8956c..117b613cb2bd 100755 --- a/system/HTTP/IncomingRequest.php +++ b/system/HTTP/IncomingRequest.php @@ -440,12 +440,11 @@ public function setPath(string $path, App $config = null) if ($config->forceGlobalSecureRequests && $this->uri->getScheme() === 'http') { $this->uri->setScheme('https'); } + } elseif (! is_cli()) { + // @codeCoverageIgnoreStart + exit('You have an empty or invalid base URL. The baseURL value must be set in Config\App.php, or through the .env file.'); + // @codeCoverageIgnoreEnd } - // @codeCoverageIgnoreStart - elseif (! is_cli()) { - die('You have an empty or invalid base URL. The baseURL value must be set in Config\App.php, or through the .env file.'); - } - // @codeCoverageIgnoreEnd return $this; } diff --git a/utils/PhpCsFixer/CodeIgniter4.php b/utils/PhpCsFixer/CodeIgniter4.php index f030254a32d5..cf4d87b3e962 100644 --- a/utils/PhpCsFixer/CodeIgniter4.php +++ b/utils/PhpCsFixer/CodeIgniter4.php @@ -120,6 +120,7 @@ public function __construct() 'native_function_casing' => true, 'native_function_type_declaration_casing' => true, 'no_alias_functions' => ['sets' => ['@all']], + 'no_alias_language_construct_call' => true, 'no_short_bool_cast' => true, 'no_trailing_comma_in_singleline_array' => true, 'no_unset_cast' => true,