Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PHPMailer::setLanguage(): make return value consistent
The return value of the method was inconsistent as it could return `true` even when the requested language was not loaded/set. Previously, the method would: * Return `false` when a `$langcode` was matched against the regex, but the file couldn't be loaded. * Return `true` in all other cases, including when a `$langcode` other than `'en'` was passed, but it didn't match the regex, which meant that effectively the requested language was ignored and English was loaded anyway, but the function would still return `true`. This has now been changed to: * Return `true` when the requested language was loaded, whether `'en'` or another language. * Return `false` when the requested language wasn't loaded and the language defaulted to English. Related to PHPMailer#2418 (comment)
- Loading branch information