php 7.4 and php 8.1

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
GrowExx
-


Joined: 06 Mar 2023
Posts: 2

PostPosted: Mon Mar 06, 2023 7:53 am    Post subject: php 7.4 and php 8.1 Reply with quote

When I run my script in PHP 7.4, it is smooth and perfect.
but same gives the error when I run in PHP 8.1

Web page says:
Sorry, Image Validation Failed!

Error log says:
PHP Warning: Undefined variable $msg in /home/xxx.php on line nn

Any suggestion?
Thanks
Back to top View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1295

PostPosted: Sat Mar 18, 2023 5:26 pm    Post subject: Re: php 7.4 and php 8.1 Reply with quote

GrowExx,

When you use a variable that has not been defined, you get a warning in PHP 8 while PHP 7 was silently accepting that and considering it as empty.

https://wiki.php.net/rfc/undefined_variable_error_promotion
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group