Closed plantheo closed 1 year ago
Apparently dynamic properties have become deprecated in PHP 8.2: https://php.watch/versions/8.2/dynamic-properties-deprecated
If someone wants to submit a PR with a suggestion of how to sensibly fix this I'd be interested.
Possibly prefacing the class phpthumb
with #[AllowDynamicProperties]
might fix that, according to the above article, but this is the first I've heard of this new deprecation, and I don't have a PHP8.2 system at hand.
I've tried the #[AllowDynamicProperties] but no success: Warning: The use statement with non-compound name 'AllowDynamicProperties' has no effect...
I could sove the problem locally with adding a __set
magic method to the class.
https://php.watch/versions/8.2/dynamic-properties-deprecated#__get-__set
I will submit a PR.
Thank you, your PR is much appreciated.
Hi there. I'm getting a deprecation notice about creation of dynamic properties:
Deprecated: Creation of dynamic property phpthumb::$hash is deprecated in /vendor/james-heinrich/phpthumb/phpthumb.class.php on line 391
phpThumb() v1.7.20-202212091316
Edit: I'm using PHP 8.2