Skip to content

Commit

Permalink
[-] BO : Fix bug #PSCSX-2455, lang not valid
Browse files Browse the repository at this point in the history
  • Loading branch information
gRoussac committed Jun 20, 2014
1 parent 5caeb82 commit aba3ecb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion classes/Language.php
Expand Up @@ -753,7 +753,7 @@ public static function checkAndAddLanguage($iso_code, $lang_pack = false, $only_
if ($key != 'iso_code' && isset(Language::$definition['fields'][$key]))
$lang->$key = $value;

if (!$lang->add(true, false, $only_add))
if (!$lang->validateFields() || !$lang->validateFieldsLang() || !$lang->add(true, false, $only_add))
return false;

$flag = Tools::file_get_contents('http://www.prestashop.com/download/lang_packs/flags/jpeg/'.$iso_code.'.jpg');
Expand Down

0 comments on commit aba3ecb

Please sign in to comment.