Skip to content

Commit

Permalink
put some sort of warning if a turkish locale is set - see postfixadmi…
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGoodwin committed Jul 13, 2022
1 parent 2882f86 commit e960fa9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions common.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@
* environment and ensures other functions are loaded.
*/

// See: https://github.com/postfixadmin/postfixadmin/pull/541 - try and check if the user has a turkish locale and warn?
$old = setlocale(LC_ALL, 'C');
if(preg_match('/_TR/i', $old)) {
error_log("WARNING: You may have a Turkish locale set; this breaks the loading of some libraries (Smarty) we depend upon.");
// don't revert back to $old?
}
else {
setlocale(LC_ALL, $old); // revert back.
}

if (!defined('POSTFIXADMIN')) {
define('POSTFIXADMIN', 1);

Expand Down

0 comments on commit e960fa9

Please # to comment.