Skip to content

Commit 49d3421

Browse files
authored
Merge pull request #7962 from kenjis/fix-spark-no-error-msg
fix: spark may not show exceptions or show backtrace as json
2 parents 0d94606 + b201faf commit 49d3421

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

system/CLI/Console.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace CodeIgniter\CLI;
1313

1414
use CodeIgniter\CodeIgniter;
15+
use Config\App;
1516
use Config\Services;
1617
use Exception;
1718

@@ -31,6 +32,10 @@ class Console
3132
*/
3233
public function run()
3334
{
35+
// Create CLIRequest
36+
$appConfig = config(App::class);
37+
Services::createRequest($appConfig, true);
38+
3439
$runner = Services::commands();
3540
$params = array_merge(CLI::getSegments(), CLI::getOptions());
3641
$params = $this->parseParamsForHelpOption($params);

user_guide_src/source/changelogs/v4.4.2.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ Bugs Fixed
3838

3939
- **CodeIgniter:** Fixed a bug that returned "200 OK" response status code when
4040
Page Not Found.
41+
- **Spark:** Fixed a bug that caused spark to not display exceptions in the
42+
production mode or to display backtrace in json when an exception occurred.
4143

4244
See the repo's
4345
`CHANGELOG.md <https://github.com/codeigniter4/CodeIgniter4/blob/develop/CHANGELOG.md>`_

0 commit comments

Comments
 (0)