PMCORE-3368 Array access to undefined index

This commit is contained in:
Roly Gutierrez
2021-09-24 00:21:49 -04:00
parent 0e655985ab
commit 71217b2bc4
2 changed files with 4 additions and 1 deletions

View File

@@ -933,8 +933,8 @@ class Language extends BaseLanguage
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRow = $oDataset->getRow();
$aRow['LANGUAGE_NAME'] = $aRow['LAN_NAME'];
if (is_array($aRow)) {
$aRow['LANGUAGE_NAME'] = $aRow['LAN_NAME'];
return $aRow;
} else {
throw (new Exception("The language '$langId' doesn\'t exist!"));