From c0426b866f5f57442b07fc85b170bbf2b6a98e18 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 26 Jan 2021 13:40:38 +0100 Subject: [PATCH] Fix loop --- htdocs/website/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 05ef2f7e64d..4ed4f727d17 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -2042,7 +2042,8 @@ if (($action == 'updatesource' || $action == 'updatecontent' || $action == 'conf if (empty($objectpage->lang) || !in_array($objectpage->lang, explode(',', $object->otherlang))) { $dirname = dirname($fileoldalias); $filename = basename($fileoldalias); - foreach (explode(',', $object->otherlang) as $sublang) { + $sublangs = explode(',', $object->otherlang); + foreach ($sublangs as $sublang) { $fileoldaliassub = $dirname.'/'.$sublang.'/'.$filename; dol_delete_file($fileoldaliassub); }