Skip to content

Commit a033985

Browse files
committed
Release v4.4.3
1 parent c84d322 commit a033985

File tree

17 files changed

+119
-29
lines changed

17 files changed

+119
-29
lines changed

app/Config/Boot/development.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
| In development, we want to show as many errors as possible to help
88
| make sure they don't make it to production. And save us hours of
99
| painful debugging.
10+
|
11+
| If you set 'display_errors' to '1', CI4's detailed error report will show.
1012
*/
1113
error_reporting(-1);
1214
ini_set('display_errors', '1');

app/Config/Boot/production.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
|--------------------------------------------------------------------------
77
| Don't show ANY in production environments. Instead, let the system catch
88
| it and display a generic error message.
9+
|
10+
| If you set 'display_errors' to '1', CI4's detailed error report will show.
911
*/
1012
ini_set('display_errors', '0');
1113
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);

app/Config/Boot/testing.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<?php
22

3+
/*
4+
* The environment testing is reserved for PHPUnit testing. It has special
5+
* conditions built into the framework at various places to assist with that.
6+
* You can’t use it for your development.
7+
*/
8+
39
/*
410
|--------------------------------------------------------------------------
511
| ERROR DISPLAY

app/Config/Filters.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ class Filters extends BaseConfig
1515
* Configures aliases for Filter classes to
1616
* make reading things nicer and simpler.
1717
*
18-
* @var array<string, string>
19-
* @phpstan-var array<string, class-string>
18+
* @var array<string, array<int, string>|string> [filter_name => classname]
19+
* or [filter_name => [classname1, classname2, ...]]
20+
* @phpstan-var array<string, class-string|list<class-string>>
2021
*/
2122
public array $aliases = [
2223
'csrf' => CSRF::class,

app/Views/errors/html/error_404.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
<?= nl2br(esc($message)) ?>
7878
<?php else : ?>
7979
<?= lang('Errors.sorryCannotFind') ?>
80-
<?php endif ?>
80+
<?php endif; ?>
8181
</p>
8282
</div>
8383
</body>

app/Views/errors/html/error_exception.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
<?php endif; ?>
4545
</div>
4646

47+
<?php if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE) : ?>
4748
<div class="container">
4849

4950
<ul class="tabs" id="tabs">
@@ -66,7 +67,7 @@
6667
<li>
6768
<p>
6869
<!-- Trace info -->
69-
<?php if (isset($row['file']) && is_file($row['file'])) :?>
70+
<?php if (isset($row['file']) && is_file($row['file'])) : ?>
7071
<?php
7172
if (isset($row['function']) && in_array($row['function'], ['include', 'include_once', 'require', 'require_once'], true)) {
7273
echo esc($row['function'] . ' ' . clean_path($row['file']));
@@ -375,14 +376,16 @@
375376
</div> <!-- /tab-content -->
376377

377378
</div> <!-- /container -->
379+
<?php endif; ?>
378380

379381
<div class="footer">
380382
<div class="container">
381383

382384
<p>
383385
Displayed at <?= esc(date('H:i:sa')) ?> &mdash;
384386
PHP: <?= esc(PHP_VERSION) ?> &mdash;
385-
CodeIgniter: <?= esc(CodeIgniter::CI_VERSION) ?>
387+
CodeIgniter: <?= esc(CodeIgniter::CI_VERSION) ?> --
388+
Environment: <?= ENVIRONMENT ?>
386389
</p>
387390

388391
</div>

system/CodeIgniter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class CodeIgniter
5454
/**
5555
* The current version of CodeIgniter Framework
5656
*/
57-
public const CI_VERSION = '4.4.2';
57+
public const CI_VERSION = '4.4.3';
5858

5959
/**
6060
* App startup time.

system/Commands/Generators/ModelGenerator.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,8 @@ protected function prepare(string $class): string
101101
$baseClass = $match[1];
102102
}
103103

104-
$table = is_string($table) ? $table : plural(strtolower($baseClass));
105-
$dbGroup = is_string($dbGroup) ? $dbGroup : 'default';
106-
$return = is_string($return) ? $return : 'array';
104+
$table = is_string($table) ? $table : plural(strtolower($baseClass));
105+
$return = is_string($return) ? $return : 'array';
107106

108107
if (! in_array($return, ['array', 'object', 'entity'], true)) {
109108
// @codeCoverageIgnoreStart
@@ -129,6 +128,6 @@ protected function prepare(string $class): string
129128
$return = "'{$return}'";
130129
}
131130

132-
return $this->parseTemplate($class, ['{table}', '{dbGroup}', '{return}'], [$table, $dbGroup, $return]);
131+
return $this->parseTemplate($class, ['{dbGroup}', '{table}', '{return}'], [$dbGroup, $table, $return], compact('dbGroup'));
133132
}
134133
}

system/Commands/Generators/Views/model.tpl.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
class {class} extends Model
88
{
9+
<?php if (is_string($dbGroup)): ?>
910
protected $DBGroup = '{dbGroup}';
11+
<?php endif; ?>
1012
protected $table = '{table}';
1113
protected $primaryKey = 'id';
1214
protected $useAutoIncrement = true;

system/Common.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ function function_usable(string $functionName): bool
579579
if (! function_exists('helper')) {
580580
/**
581581
* Loads a helper file into memory. Supports namespaced helpers,
582-
* both in and out of the 'helpers' directory of a namespaced directory.
582+
* both in and out of the 'Helpers' directory of a namespaced directory.
583583
*
584584
* Will load ALL helpers of the matching name, in the following order:
585585
* 1. app/Helpers

0 commit comments

Comments
 (0)