Are there any differences between php 7.0 and 7.1 when handling undefined variables?
12 views
Skip to first unread message
harriett...@gmail.com
unread,
Mar 27, 2018, 3:43:19 PM3/27/18
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
I have a php app that's been working for months. Then all of a sudden it starts to render Internal Server 500 errors when encountering undefined variables in code. I had to use isset() to check the variables first.
I also found that the app server is installed with two versions of PHP - 7.0 and 7.1. There are two handlers mapped to *.php files. When I run phpinfo(), it's version 7.1 info displays. I wonder if there is any differences between how version 7.0 and 7.1 handle undefined new variables.
Any ideas? Many thanks.
Angel
unread,
Jun 29, 2022, 1:01:30 PM6/29/22
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Sign in to report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Always add a value to a variable. Do not leave a variable undefined, it can produce serious problems running the app.