From 1f116eee67dbffcd30142db18cc0e45f41e53591 Mon Sep 17 00:00:00 2001 From: Andreas <6977712+AndreasK79@users.noreply.github.com> Date: Sun, 16 Jul 2023 09:49:49 +0200 Subject: [PATCH] [PHP8.2] Updated CI files to work with PHP8.2 --- system/core/Controller.php | 1 + system/core/Loader.php | 1 + system/core/Router.php | 7 +++++++ system/core/URI.php | 7 +++++++ system/database/DB_driver.php | 3 ++- system/libraries/Profiler.php | 1 + 6 files changed, 19 insertions(+), 1 deletion(-) diff --git a/system/core/Controller.php b/system/core/Controller.php index 05230e40..20af1df8 100644 --- a/system/core/Controller.php +++ b/system/core/Controller.php @@ -49,6 +49,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @author EllisLab Dev Team * @link https://codeigniter.com/userguide3/general/controllers.html */ +#[AllowDynamicProperties] class CI_Controller { /** diff --git a/system/core/Loader.php b/system/core/Loader.php index d9a1539a..80afffcf 100644 --- a/system/core/Loader.php +++ b/system/core/Loader.php @@ -48,6 +48,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @author EllisLab Dev Team * @link https://codeigniter.com/userguide3/libraries/loader.html */ +#[AllowDynamicProperties] class CI_Loader { // All these are set automatically. Don't mess with them. diff --git a/system/core/Router.php b/system/core/Router.php index 0d966255..c2fbb147 100644 --- a/system/core/Router.php +++ b/system/core/Router.php @@ -50,6 +50,13 @@ defined('BASEPATH') OR exit('No direct script access allowed'); */ class CI_Router { + /** + * CI_URI class object + * + * @var object + */ + public $uri; + /** * CI_Config class object * diff --git a/system/core/URI.php b/system/core/URI.php index 9bef22d6..2b664c84 100644 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -50,6 +50,13 @@ defined('BASEPATH') OR exit('No direct script access allowed'); */ class CI_URI { + /** + * CI_Config instance + * + * @var CI_Config + */ + public $config; + /** * List of cached URI segments * diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php index cba96d9a..95527559 100644 --- a/system/database/DB_driver.php +++ b/system/database/DB_driver.php @@ -50,6 +50,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @author EllisLab Dev Team * @link https://codeigniter.com/userguide3/database/ */ +#[AllowDynamicProperties] abstract class CI_DB_driver { /** @@ -825,7 +826,7 @@ abstract class CI_DB_driver { { return $this->_trans_status; } - + // -------------------------------------------------------------------- /** diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 0ef908bc..8560d105 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -52,6 +52,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @author EllisLab Dev Team * @link https://codeigniter.com/userguide3/general/profiling.html */ +#[AllowDynamicProperties] class CI_Profiler { /**