Skip to content

Commit 68d1a58

Browse files
committed
Release v4.6.3
1 parent dbc07dc commit 68d1a58

File tree

8 files changed

+31
-12
lines changed

8 files changed

+31
-12
lines changed

app/Config/Filters.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ class Filters extends BaseFilters
6565
* List of filter aliases that are always
6666
* applied before and after every request.
6767
*
68-
* @var array<string, array<string, array<string, string>>>|array<string, list<string>>
68+
* @var array{
69+
* before: array<string, array{except: list<string>|string}>|list<string>,
70+
* after: array<string, array{except: list<string>|string}>|list<string>
71+
* }
6972
*/
7073
public array $globals = [
7174
'before' => [

preload.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class preload
5757
'/system/Config/Routes.php',
5858
'/system/Language/',
5959
'/system/bootstrap.php',
60+
'/system/util_bootstrap.php',
6061
'/system/rewrite.php',
6162
'/Views/',
6263
// Errors occur.

system/CodeIgniter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class CodeIgniter
5555
/**
5656
* The current version of CodeIgniter Framework
5757
*/
58-
public const CI_VERSION = '4.6.2';
58+
public const CI_VERSION = '4.6.3';
5959

6060
/**
6161
* App startup time.

system/Config/Filters.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ class Filters extends BaseConfig
7878
* List of filter aliases that are always
7979
* applied before and after every request.
8080
*
81-
* @var array<string, array<string, array<string, string>>>|array<string, list<string>>
81+
* @var array{
82+
* before: array<string, array{except: list<string>|string}>|list<string>,
83+
* after: array<string, array{except: list<string>|string}>|list<string>
84+
* }
8285
*/
8386
public array $globals = [
8487
'before' => [

system/Debug/Toolbar/Collectors/Routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class Routes extends BaseCollector
5151
* Returns the data of this collector to be formatted in the toolbar
5252
*
5353
* @return array{
54-
* matchedRoute: array<array{
54+
* matchedRoute: list<array{
5555
* directory: string,
5656
* controller: string,
5757
* method: string,

system/Email/Email.php

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ class Email
263263
/**
264264
* SMTP Connection socket placeholder
265265
*
266-
* @var resource|null
266+
* @var false|resource|null
267267
*/
268268
protected $SMTPConnect;
269269

@@ -1308,7 +1308,7 @@ protected function appendAttachments(&$body, $boundary, $multipart = null)
13081308
. 'Content-Type: ' . $attachment['type'] . '; name="' . $name . '"' . $this->newline
13091309
. 'Content-Disposition: ' . $attachment['disposition'] . ';' . $this->newline
13101310
. 'Content-Transfer-Encoding: base64' . $this->newline
1311-
. ($attachment['cid'] === '' ? '' : 'Content-ID: <' . $attachment['cid'] . '>' . $this->newline)
1311+
. (isset($attachment['cid']) && $attachment['cid'] !== '' ? 'Content-ID: <' . $attachment['cid'] . '>' . $this->newline : '')
13121312
. $this->newline
13131313
. $attachment['content'] . $this->newline;
13141314
}
@@ -1886,7 +1886,7 @@ protected function SMTPEnd()
18861886
*/
18871887
protected function SMTPConnect()
18881888
{
1889-
if (is_resource($this->SMTPConnect)) {
1889+
if ($this->isSMTPConnected()) {
18901890
return true;
18911891
}
18921892

@@ -1910,7 +1910,7 @@ protected function SMTPConnect()
19101910
$this->SMTPTimeout,
19111911
);
19121912

1913-
if (! is_resource($this->SMTPConnect)) {
1913+
if (! $this->isSMTPConnected()) {
19141914
$this->setErrorMessage(lang('Email.SMTPError', [$errno . ' ' . $errstr]));
19151915

19161916
return false;
@@ -2227,7 +2227,7 @@ protected function mimeTypes($ext = '')
22272227

22282228
public function __destruct()
22292229
{
2230-
if ($this->SMTPConnect !== null) {
2230+
if ($this->isSMTPConnected()) {
22312231
try {
22322232
$this->sendCommand('quit');
22332233
} catch (ErrorException $e) {
@@ -2284,4 +2284,16 @@ protected function setArchiveValues(): array
22842284

22852285
return $this->archive;
22862286
}
2287+
2288+
/**
2289+
* Checks if there is an active SMTP connection.
2290+
*
2291+
* @return bool True if SMTP connection is established and open, false otherwise
2292+
*/
2293+
protected function isSMTPConnected(): bool
2294+
{
2295+
return $this->SMTPConnect !== null
2296+
&& $this->SMTPConnect !== false
2297+
&& get_debug_type($this->SMTPConnect) !== 'resource (closed)';
2298+
}
22872299
}

system/Router/RouteCollection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1724,7 +1724,7 @@ public function resetRoutes()
17241724
* @return array<
17251725
* string,
17261726
* array{
1727-
* filter?: string|list<string>, namespace?: string, hostname?: string,
1727+
* filter?: list<string>|string, namespace?: string, hostname?: string,
17281728
* subdomain?: string, offset?: int, priority?: int, as?: string,
17291729
* redirect?: int
17301730
* }

system/Test/Mock/MockConnection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ class MockConnection extends BaseConnection
2727
{
2828
/**
2929
* @var array{
30-
* connect?: object|resource|false|list<object|resource|false>,
31-
* execute?: object|resource|false,
30+
* connect?: false|list<false|object|resource>|object|resource,
31+
* execute?: false|object|resource,
3232
* }
3333
*/
3434
protected $returnValues = [];

0 commit comments

Comments
 (0)