8109175771

Creation of dynamic property CI_URI::$config is deprecated

PHP 29-11-2023

Creation of dynamic property CI_URI::$config is deprecated

Details

If you encounter this error in CodeIgniter with PHP versions 8.1 and 8.2, you need to make some changes in the following CodeIgniter files:

  1. /system/core/URI.php
  2. #[\AllowDynamicProperties]
    
    class CI_URI {
    
  3. /system/core/Router.php
  4. #[\AllowDynamicProperties]
    
    class CI_Router {
    
  5. /system/core/Loader.php
  6. #[\AllowDynamicProperties]
    
    class CI_Loader {
    
  7. /system/core/Controller.php
  8. #[\AllowDynamicProperties]
    
    class CI_Controller {
    
  9. /system/database/DB_driver.php
  10. #[\AllowDynamicProperties]
    
    class CI_DB_driver {
    

After making these adjustments, reload the project. You should now observe that the CodeIgniter project runs successfully.


Example

Close Ads