Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic property Securimage.... is deprecated in php 8.2 #116

Open
graphicz opened this issue Sep 13, 2023 · 1 comment
Open

dynamic property Securimage.... is deprecated in php 8.2 #116

graphicz opened this issue Sep 13, 2023 · 1 comment

Comments

@graphicz
Copy link

First of all thank you so much for this brilliant update of Securimage, I am really thrilled with it, thank you!

I tested on a Linux server with php v8.2 and got these warnings:
Deprecated: Creation of dynamic property Securimage::$code_entered is deprecated in /home/newebsite/public_html/securimage-nextgen/securimage-nextgen/securimage.php on line 1028
Deprecated: Creation of dynamic property Securimage::$correct_code is deprecated in /home/newebsite/public_html/securimage-nextgen/securimage-nextgen/securimage.php on line 1029

After some Googling I came upon this:
https://stackoverflow.com/questions/74878889/php-warning-deprecated-creation-of-dynamic-property-is-deprecated

Opening securimage.php and looking at line 60 class Securimage I added immediately above #[\AllowDynamicProperties]
so lines 60/61 now look like:

#[\AllowDynamicProperties]
class Securimage

and the errors have gone.

Thank you

@flipreverse
Copy link

@graphicz Have a look at my fork: https://github.com/flipreverse/securimage
I've just fixed some PHP 8.2 deprecated warnings including a quick and dirty try for your isse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants