diff --git a/system/CLI/Console.php b/system/CLI/Console.php index 0ea7eae22c7f..16e5df831efc 100644 --- a/system/CLI/Console.php +++ b/system/CLI/Console.php @@ -12,6 +12,7 @@ namespace CodeIgniter\CLI; use CodeIgniter\CodeIgniter; +use Config\App; use Config\Services; use Exception; @@ -31,6 +32,10 @@ class Console */ public function run() { + // Create CLIRequest + $appConfig = config(App::class); + Services::createRequest($appConfig, true); + $runner = Services::commands(); $params = array_merge(CLI::getSegments(), CLI::getOptions()); $params = $this->parseParamsForHelpOption($params); diff --git a/user_guide_src/source/changelogs/v4.4.2.rst b/user_guide_src/source/changelogs/v4.4.2.rst index 68cba760c549..270442b9d747 100644 --- a/user_guide_src/source/changelogs/v4.4.2.rst +++ b/user_guide_src/source/changelogs/v4.4.2.rst @@ -34,6 +34,8 @@ Bugs Fixed - **CodeIgniter:** Fixed a bug that returned "200 OK" response status code when Page Not Found. +- **Spark:** Fixed a bug that caused spark to not display exceptions in the + production mode or to display backtrace in json when an exception occurred. See the repo's `CHANGELOG.md `_