diff --git a/wire/modules/Process/ProcessLogin/ProcessLogin.module b/wire/modules/Process/ProcessLogin/ProcessLogin.module index 3c6a933d..d6dae0ac 100644 --- a/wire/modules/Process/ProcessLogin/ProcessLogin.module +++ b/wire/modules/Process/ProcessLogin/ProcessLogin.module @@ -270,7 +270,6 @@ class ProcessLogin extends Process { /** * Hook called after login * - * @todo: move the following elsewhere out of this class: * Notify admin if there are any issues that need their attention. * Happens only on the admin login form after superuser login. * @@ -336,6 +335,17 @@ class ProcessLogin extends Process { $this->error("Warning: you have a field named 'published' that conflicts with the page 'published' property. Please rename your field field to something else and update any templates referencing it."); } + // warning about servers with locales that break UTF-8 strings called by basename + // and other file functions, due to a long running PHP bug + if(basename("§") === "") { + $s = stripos(PHP_OS, 'WIN') === 0 ? 'en-US' : 'en_US.UTF-8'; + $this->warning( + $this->_('Warning: your server locale is undefined and may cause issues.') . ' ' . + sprintf($this->_('Please add this to /site/config.php file (adjust “%s” as needed):'), $s) . ' ' . + "setlocale(LC_ALL,'$s');" + ); + } + } /**