PMCORE-3368 Array access to undefined index
This commit is contained in:
@@ -933,8 +933,8 @@ class Language extends BaseLanguage
|
|||||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||||
$oDataset->next();
|
$oDataset->next();
|
||||||
$aRow = $oDataset->getRow();
|
$aRow = $oDataset->getRow();
|
||||||
$aRow['LANGUAGE_NAME'] = $aRow['LAN_NAME'];
|
|
||||||
if (is_array($aRow)) {
|
if (is_array($aRow)) {
|
||||||
|
$aRow['LANGUAGE_NAME'] = $aRow['LAN_NAME'];
|
||||||
return $aRow;
|
return $aRow;
|
||||||
} else {
|
} else {
|
||||||
throw (new Exception("The language '$langId' doesn\'t exist!"));
|
throw (new Exception("The language '$langId' doesn\'t exist!"));
|
||||||
|
|||||||
@@ -195,6 +195,9 @@ class Users extends BaseUsers
|
|||||||
$role = $roles->loadByCode($aFields['USR_ROLE']);
|
$role = $roles->loadByCode($aFields['USR_ROLE']);
|
||||||
$aFields['USR_ROLE_NAME'] = $role['ROL_NAME'];
|
$aFields['USR_ROLE_NAME'] = $role['ROL_NAME'];
|
||||||
|
|
||||||
|
if (empty($aFields['USR_DEFAULT_LANG'])) {
|
||||||
|
$aFields['USR_DEFAULT_LANG'] = 'en';
|
||||||
|
}
|
||||||
$translations = new Language();
|
$translations = new Language();
|
||||||
$translation = $translations->loadByCode($aFields['USR_DEFAULT_LANG']);
|
$translation = $translations->loadByCode($aFields['USR_DEFAULT_LANG']);
|
||||||
$aFields['USR_DEFAULT_LANG_NAME'] = $translation['LANGUAGE_NAME'];
|
$aFields['USR_DEFAULT_LANG_NAME'] = $translation['LANGUAGE_NAME'];
|
||||||
|
|||||||
Reference in New Issue
Block a user