Update class.phpmailer.php

Compatibility with versions prior then 5.3 (__DIR__ introduced)
- Using DIRECTORY_SEPARATOR, instead of /
This commit is contained in:
Stephan de Souza 2014-03-28 18:34:23 -03:00
parent efd2b91d03
commit eee1c39875
1 changed files with 5 additions and 1 deletions

View File

@ -1379,7 +1379,11 @@ class PHPMailer
);
//Load the language path from absolute position
if(!$lang_path) {
$lang_path = __DIR__ . '/language/';
if (version_compare(PHP_VERSION, '5.3.0', 'lt')) {
$lang_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR;
} else {
$lang_path = __DIR__ . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR;
}
}
//Overwrite language-specific strings.
//This way we'll never have missing translations - no more "language string failed to load"!