Skip to content

Commit

Permalink
Updated default language path (#1390)
Browse files Browse the repository at this point in the history
* Updated default language path

* Calculated path instead of building string version

* Removed whitespace in function call
  • Loading branch information
notian authored and Synchro committed Mar 26, 2018
1 parent 4fd6207 commit 58fa10d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PHPMailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1994,7 +1994,7 @@ public function setLanguage($langcode = 'en', $lang_path = '')
];
if (empty($lang_path)) {
// Calculate an absolute path so it can work if CWD is not here
$lang_path = __DIR__ . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR;
$lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR;
}
//Validate $langcode
if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) {
Expand Down

0 comments on commit 58fa10d

Please sign in to comment.