mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Fix change info when config.account_country is disabled
Some PHP warnings and notices
This commit is contained in:
parent
c991e085d4
commit
b7bb570420
@ -39,23 +39,24 @@ if(isset($_POST['changeinfosave']) && $_POST['changeinfosave'] == 1) {
|
||||
if($show_form) {
|
||||
$account_rlname = $account_logged->getCustomField("rlname");
|
||||
$account_location = $account_logged->getCustomField("location");
|
||||
if ($config['account_country'])
|
||||
if ($config['account_country']) {
|
||||
$account_country = $account_logged->getCustomField("country");
|
||||
|
||||
$countries = array();
|
||||
foreach (array('pl', 'se', 'br', 'us', 'gb',) as $country)
|
||||
$countries[$country] = $config['countries'][$country];
|
||||
$countries = array();
|
||||
foreach (array('pl', 'se', 'br', 'us', 'gb',) as $country)
|
||||
$countries[$country] = $config['countries'][$country];
|
||||
|
||||
$countries['--'] = '----------';
|
||||
$countries['--'] = '----------';
|
||||
|
||||
foreach ($config['countries'] as $code => $country)
|
||||
$countries[$code] = $country;
|
||||
foreach ($config['countries'] as $code => $country)
|
||||
$countries[$code] = $country;
|
||||
}
|
||||
|
||||
$twig->display('account.change_info.html.twig', array(
|
||||
'countries' => $countries,
|
||||
'countries' => isset($countries) ? $countries : [],
|
||||
'account_rlname' => $account_rlname,
|
||||
'account_location' => $account_location,
|
||||
'account_country' => $account_country
|
||||
'account_country' => isset($account_country) ? $account_country : ''
|
||||
));
|
||||
}
|
||||
?>
|
Loading…
x
Reference in New Issue
Block a user