Deprecated dynamic properties in PHP 8.2 |
(01-19-2023, 06:53 AM)ubeljan Wrote:Given the rampant use of dynamic properties that I've seen in CI3's source code, I don't know if adding all of these public object properties is the best approach. Are you sure that you got them all? I expect you haven't. I also think that some of the ways by which CI3 loads libraries may introduce a near-infinite number of new object properties that you have no accounted for.(01-17-2023, 03:58 PM)Codeigniter 3 and PHP 8.2To get rid of the error messages you have to change some variables in the system map. With this changes I could access the database and email libraries without error messages. Add the public variables to the mentioned files./system/core/URI.php Wrote: class CI_URI { If you had read the link in the original post of this thread, you would know there are two other ways which would cover all possible dynamic properties, and these would involve a lot less code: 1) implement __get and __set methods to intercept assignment of properties that have not been expressly defined. 2) Add the AllowDynamicProperties attribute in the relevant classes. Code: #[\AllowDynamicProperties] |
Welcome Guest, Not a member yet? Register Sign In |