From f354c85fbab5b1736f9a7c02f4bdf2cd97315592 Mon Sep 17 00:00:00 2001 From: kenjis Date: Sat, 9 Dec 2023 11:15:12 +0900 Subject: [PATCH] fix: COMPOSER_PATH may be false PHP Fatal error: Uncaught TypeError: is_file(): Argument #1 ($filename) must be of type string, bool given in /home/runner/work/CodeIgniter4/CodeIgniter4/system/Autoloader/Autoloader.php:126 --- system/Test/bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/Test/bootstrap.php b/system/Test/bootstrap.php index fcd3c9498af3..3e2d54fdb564 100644 --- a/system/Test/bootstrap.php +++ b/system/Test/bootstrap.php @@ -46,7 +46,7 @@ defined('FCPATH') || define('FCPATH', realpath(PUBLICPATH) . DIRECTORY_SEPARATOR); defined('TESTPATH') || define('TESTPATH', realpath(HOMEPATH . 'tests/') . DIRECTORY_SEPARATOR); defined('SUPPORTPATH') || define('SUPPORTPATH', realpath(TESTPATH . '_support/') . DIRECTORY_SEPARATOR); -defined('COMPOSER_PATH') || define('COMPOSER_PATH', realpath(HOMEPATH . 'vendor/autoload.php')); +defined('COMPOSER_PATH') || define('COMPOSER_PATH', (string) realpath(HOMEPATH . 'vendor/autoload.php')); defined('VENDORPATH') || define('VENDORPATH', realpath(HOMEPATH . 'vendor') . DIRECTORY_SEPARATOR); // Load Common.php from App then System