Error on Admin Orders page if Country is NULL in Customer Data
Posted: Sun Sep 15, 2024 2:13 am
I have been seeing the following errors in my Admin error_log:
[14-Sep-2024 21:45:47 America/New_York] PHP Notice: Trying to access array offset on value of type null in /home4/birdonaw/public_html/oscomce/includes/modules/customer_data/cd_traditional_address.php on line 141
[14-Sep-2024 21:45:47 America/New_York] PHP Notice: Trying to access array offset on value of type null in /home4/birdonaw/public_html/oscomce/includes/modules/customer_data/cd_traditional_address.php on line 141
[14-Sep-2024 21:45:47 America/New_York] PHP Notice: Trying to access array offset on value of type null in /home4/birdonaw/public_html/oscomce/includes/modules/customer_data/cd_traditional_address.php on line 141
These errors occur when you display the Order in the admin, and the Country is NULL.
I was hoping Country would not need to be a required field, since I have a small store with only 1 country. I was thinking a better user experience if Country was not required.
I did a little more investigation, and I found if xxx_address_format_id in the Orders table is 0 or NULL, then this error is thrown.
Does anyone know if Country can be optional, or does it have to be a required field? If it can be optional, I would appreciate any thoughts on how to correct this issue.
[14-Sep-2024 21:45:47 America/New_York] PHP Notice: Trying to access array offset on value of type null in /home4/birdonaw/public_html/oscomce/includes/modules/customer_data/cd_traditional_address.php on line 141
[14-Sep-2024 21:45:47 America/New_York] PHP Notice: Trying to access array offset on value of type null in /home4/birdonaw/public_html/oscomce/includes/modules/customer_data/cd_traditional_address.php on line 141
[14-Sep-2024 21:45:47 America/New_York] PHP Notice: Trying to access array offset on value of type null in /home4/birdonaw/public_html/oscomce/includes/modules/customer_data/cd_traditional_address.php on line 141
These errors occur when you display the Order in the admin, and the Country is NULL.
I was hoping Country would not need to be a required field, since I have a small store with only 1 country. I was thinking a better user experience if Country was not required.
I did a little more investigation, and I found if xxx_address_format_id in the Orders table is 0 or NULL, then this error is thrown.
Does anyone know if Country can be optional, or does it have to be a required field? If it can be optional, I would appreciate any thoughts on how to correct this issue.