Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Views/errors/cli/error_exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
foreach ($backtraces as $i => $error) {
$padFile = ' '; // 4 spaces
$padClass = ' '; // 7 spaces
$c = str_pad($i + 1, 3, ' ', STR_PAD_LEFT);
$c = str_pad((string) ($i + 1), 3, ' ', STR_PAD_LEFT);

if (isset($error['file'])) {
$filepath = clean_path($error['file']) . ':' . $error['line'];
Expand Down
2 changes: 1 addition & 1 deletion system/Cache/Handlers/FileHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ protected function getItem(string $filename): array|false
}

try {
$data = unserialize($content, ['allowed_classes' => false]);
$data = unserialize($content, ['allowed_classes' => true]);
} catch (Throwable) {
return false;
}
Expand Down
2 changes: 0 additions & 2 deletions system/CodeIgniter.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/**
* This file is part of CodeIgniter 4 framework.
*
Expand Down
4 changes: 1 addition & 3 deletions system/Config/BaseConfig.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/**
* This file is part of CodeIgniter 4 framework.
*
Expand Down Expand Up @@ -190,7 +188,7 @@ protected function initEnvValue(&$property, string $name, string $prefix, string
return;
}

$value = trim($value, '\'"');
$value = trim((string) $value, '\'"');

if (is_int($property)) {
$value = (int) $value;
Expand Down
2 changes: 0 additions & 2 deletions system/Test/ControllerTestTrait.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/**
* This file is part of CodeIgniter 4 framework.
*
Expand Down
2 changes: 0 additions & 2 deletions system/View/Filters.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/**
* This file is part of CodeIgniter 4 framework.
*
Expand Down
2 changes: 0 additions & 2 deletions system/View/Parser.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/**
* This file is part of CodeIgniter 4 framework.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/_support/Commands/Foobar.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
* the LICENSE file that was distributed with this source code.
*/

use CodeIgniter\CLI\CLI;
use Config\App;
use CodeIgniter\CLI\CLI;

return [
'foo' => 'The command will use this as foo.',
Expand Down
2 changes: 0 additions & 2 deletions tests/_support/Controllers/Newautorouting.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/**
* This file is part of CodeIgniter 4 framework.
*
Expand Down
1 change: 1 addition & 0 deletions tests/system/Cache/Handlers/PredisHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ protected function setUp(): void

$this->config = new Cache();
$this->handler = CacheFactory::getHandler($this->config, 'predis');
$this->handler->clean();
}

protected function tearDown(): void
Expand Down
4 changes: 2 additions & 2 deletions tests/system/Debug/ExceptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ public function testDeprecationsOnPhp81DoNotThrow(): void
$this->exception->initialize();

try {
$result = str_contains('foobar', null); // @phpstan-ignore argument.type (Needed for testing)
$this->assertLogContains('error', '[DEPRECATED] str_contains(): ');
@trigger_error('Hello! I am a deprecation!', E_USER_DEPRECATED);
$this->assertLogContains('error', '[DEPRECATED] Hello! I am a deprecation!');
} catch (ErrorException) {
$this->fail('The catch block should not be reached.');
} finally {
Expand Down