An admin I'm helping indicated my Register Email add-on was throwing an error during registration. What I found was the option_value field is different between his table and my test forum:
In his database the requireLocation is not present
Looks like the requireLocation is not going to be present unless that field in the Options page is selected at least once. So even if it's deselected it will remain in the option_value.
So if the Require Location checkbox in the User Registration Options page has never been checked, the above PHP code throws an error due to the value not having been set yet. How can I prevent the server error? Do I need to do a database query directly on the xf_option table?