Commit c6535a96 authored by damjan's avatar damjan

[BUGFIX] Fixes invalid argument supplied for foreach

parent 3e7add0e
......@@ -139,8 +139,8 @@ class FileOverrideService extends FileBaseXMLService {
try {
SgLib::createDir($this->absPath, PATH_site);
} catch (\Exception $e) {
throw new LFException('failure.failure', 0, '(' . $e->getMessage() . ')');
} catch (\Exception $exception) {
throw new LFException('failure.failure', 0, '(' . $exception->getMessage() . ')');
}
parent::writeFile();
......@@ -159,8 +159,8 @@ class FileOverrideService extends FileBaseXMLService {
Typo3Lib::writeLineToAdditionalConfiguration($addLine);
$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$typo3ExtRelativeFilePath][0]
= $relativeOverrideFilePath;
} catch (\Exception $e) {
throw new LFException('failure.failure', 0, '(' . $e->getMessage() . ')');
} catch (\Exception $exception) {
throw new LFException('failure.failure', 0, '(' . $exception->getMessage() . ')');
}
}
......@@ -171,11 +171,14 @@ class FileOverrideService extends FileBaseXMLService {
* @return void
*/
public function deleteDuplicates() {
foreach ($this->localLang as $lang => $langData) {
foreach ($langData as $constKey => $constValue) {
$localLangData = $this->originalFileObject->getLocalLangData($lang);
foreach ($this->localLang as $language => $languageData) {
if (!is_array($languageData)) {
continue;
}
foreach ($languageData as $constKey => $constValue) {
$localLangData = $this->originalFileObject->getLocalLangData($language);
if (SgLib::strCmpIgnoreCRConvertLF($constValue, $localLangData[$constKey])) {
unset($this->localLang[$lang][$constKey]);
unset($this->localLang[$language][$constKey]);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment