9 Dec 2023, 3:16 PM
New Zenner
- Join Date:
- Apr 2011
- Location:
- Espoo, Finland
- Posts:
- 73
- Plugin Contributions:
- 0
Post #1 by yesaul
Good day,
Sorry (if I do understand sometyhng wrong or issue has been already described), but the following code in create_account.php module can cause "Undefined variable" warning:
/**
* Process form contents
*/
if (isset($_POST['action']) && ($_POST['action'] == 'process') && !isset($login_page)) {
...
[B]$country[/B] = zen_db_prepare_input($_POST['zone_country_id']);
...
}
/*
* Set flags for template use:
*/
$selected_country = (isset($_POST['zone_country_id']) && $_POST['zone_country_id'] != '') ? [B]$country[/B] : SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY;
...
My homble suggestion (line 401):
$selected_country = !empty($_POST['zone_country_id']) ? zen_db_prepare_input($_POST['zone_country_id']) : SHOW_CREATE_ACCOUNT_DEFAULT_COUNTRY;