spedas / bleeding_edge

IDL-based Space Physics Environment Data Analysis Software (bleeding edge)
http://www.spedas.org
Other
7 stars 0 forks source link

PHP warnings from asi_list.php #123

Closed jameswilburlewis closed 10 months ago

jameswilburlewis commented 10 months ago

From HTTPD logs:


[Tue Nov 28 04:20:50.334611 2023] [php:warn] [pid 28662] [client 172.121.223.108:46189] PHP Warning:  Undefined array key "selsort" in /mydisks/home/www/html/gmag/asi_list.php on line 249
[Tue Nov 28 04:20:50.393004 2023] [php:warn] [pid 28662] [client 172.121.223.108:46189] PHP Warning:  Trying to access array offset on value of type null in /mydisks/home/www/html/gmag/asi_list.php on line 320
[Tue Nov 28 04:20:50.393052 2023] [php:warn] [pid 28662] [client 172.121.223.108:46189] PHP Warning:  Trying to access array offset on value of type null in /mydisks/home/www/html/gmag/asi_list.php on line 320
nickssl commented 10 months ago

This is now fixed.

The reason for the warnings is that some URL variables were not set, so PHP complained about it (although it was not actually affecting anything). The proper way to get the URL variables and avoid such warnings is to use the function isset().