Commit 05ffc3fd authored by Dries's avatar Dries

Issue #1864472 by Sutharsan: Warning when tries to delete English after...

Issue #1864472 by Sutharsan: Warning when tries to delete English after non-English install, locale_translation_status_delete_languages().
parent 39119724
......@@ -944,16 +944,16 @@ function locale_translation_status_save($data) {
* Language code(s) to be deleted from the cache.
*/
function locale_translation_status_delete_languages($langcodes) {
$status = state()->get('locale.translation_status');
foreach ($status as $project => $languages) {
foreach ($languages as $langcode => $source) {
if (in_array($langcode, $langcodes)) {
unset($status[$project][$langcode]);
if ($status = state()->get('locale.translation_status')) {
foreach ($status as $project => $languages) {
foreach ($languages as $langcode => $source) {
if (in_array($langcode, $langcodes)) {
unset($status[$project][$langcode]);
}
}
}
state()->set('locale.translation_status', $status);
}
state()->set('locale.translation_status', $status);
}
/**
......
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