0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-20 18:03:04 +02:00

Merge pull request #174 from mmeyer2k/patch-1

Remove usage of error control operator in setLanguage()
This commit is contained in:
Marcus Bointon 2014-01-29 00:02:56 -08:00
commit 556e51e753

View File

@ -1380,8 +1380,14 @@ class PHPMailer
//Overwrite language-specific strings.
//This way we'll never have missing translations - no more "language string failed to load"!
$l = true;
$lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php';
if ($langcode != 'en') { //There is no English translation file
$l = @include $lang_path . 'phpmailer.lang-' . $langcode . '.php';
//Make sure language file path is readable
if (!is_readable($lang_file)) {
$l = false;
} else {
$l = include $lang_file;
}
}
$this->language = $PHPMAILER_LANG;
return ($l == true); //Returns false if language not found