Merge pull request #17144 from indelog/fix_website_savepagealias_empty_otherlang

Fix empty $sublang dolSavePageAlias
This commit is contained in:
Laurent Destailleur 2021-04-07 01:40:11 +02:00 committed by GitHub
commit 20fbfc5b15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,7 +104,7 @@ function dolSavePageAlias($filealias, $object, $objectpage)
}
// Save also alias into all language subdirectories if it is a main language
elseif (empty($objectpage->lang) || !in_array($objectpage->lang, explode(',', $object->otherlang))) {
if (empty($conf->global->WEBSITE_DISABLE_MAIN_LANGUAGE_INTO_LANGSUBDIR)) {
if (empty($conf->global->WEBSITE_DISABLE_MAIN_LANGUAGE_INTO_LANGSUBDIR) && !empty($object->otherlang)) {
$dirname = dirname($filealias);
$filename = basename($filealias);
foreach (explode(',', $object->otherlang) as $sublang) {