Welcome Guest, Not a member yet? Register   Sign In
Deprecated dynamic properties in PHP 8.2
#9

(01-19-2023, 09:02 AM)ubeljan Wrote: I think a better way is to implement  #[\AllowDynamicProperties]

Easier and much shorter.

In all the above mentioned classes add #[\AllowDynamicProperties] above class xxxxxx {

I give you my changes:


/system/core/URI.php

    #[\AllowDynamicProperties]

    class CI_URI {
   
   
/system/core/Router.php   

    #[\AllowDynamicProperties]

    class CI_Router {
   
   
/system/core/Loader.php 

    #[\AllowDynamicProperties]
   
    class CI_Loader {
   
   
/system/core/Controller.php     
   
    #[\AllowDynamicProperties]

    class CI_Controller {   
   
   
/system/core/DB_driver.php   

    #[\AllowDynamicProperties]

    abstract class CI_DB_driver {

This totally worked for me. Thank you
Reply


Messages In This Thread
RE: Deprecated dynamic properties in PHP 8.2 - by dexterbrian - 02-16-2023, 07:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB