diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html index b8d337cfd8..0c87ed65b4 100644 --- a/phpBB/adm/style/acp_main.html +++ b/phpBB/adm/style/acp_main.html @@ -78,6 +78,13 @@

{L_ERROR_MBSTRING_HTTP_OUTPUT_EXPLAIN}

+ + {% if S_DEFAULT_CHARSET_FAIL %} +
+

{{ lang('ERROR_DEFAULT_CHARSET') }}

+

{{ lang('ERROR_DEFAULT_CHARSET_EXPLAIN') }}

+
+ {% endif %} diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index 5c07cad487..4abc176d19 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -672,16 +672,22 @@ class acp_main $encoding_translation = $this->php_ini->getString('mbstring.encoding_translation'); $http_input = $this->php_ini->getString('mbstring.http_input'); $http_output = $this->php_ini->getString('mbstring.http_output'); + $default_charset = $this->php_ini->getString('default_charset'); if (extension_loaded('mbstring')) { - $template->assign_vars(array( + /** + * “mbstring.http_input” and “mbstring.http_output” are deprecated as of PHP 5.6.0 + * @link https://www.php.net/manual/mbstring.configuration.php#ini.mbstring.http-input + */ + $template->assign_vars([ 'S_MBSTRING_LOADED' => true, 'S_MBSTRING_FUNC_OVERLOAD_FAIL' => $func_overload && ($func_overload & (MB_OVERLOAD_MAIL | MB_OVERLOAD_STRING)), 'S_MBSTRING_ENCODING_TRANSLATION_FAIL' => $encoding_translation && ($encoding_translation != 0), - 'S_MBSTRING_HTTP_INPUT_FAIL' => $http_input && !in_array($http_input, array('pass', '')), - 'S_MBSTRING_HTTP_OUTPUT_FAIL' => $http_output && !in_array($http_output, array('pass', '')), - )); + 'S_MBSTRING_HTTP_INPUT_FAIL' => !empty($http_input), + 'S_MBSTRING_HTTP_OUTPUT_FAIL' => !empty($http_output), + 'S_DEFAULT_CHARSET_FAIL' => $default_charset !== 'UTF-8', + ]); } // Fill dbms version if not yet filled diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index bf1ed5f34f..eda5b6ccf9 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -390,9 +390,11 @@ $lang = array_merge($lang, array( 'ERROR_MBSTRING_ENCODING_TRANSLATION' => 'Transparent character encoding is improperly configured', 'ERROR_MBSTRING_ENCODING_TRANSLATION_EXPLAIN' => 'mbstring.encoding_translation must be set to 0. You can check the current value on the PHP information page.', 'ERROR_MBSTRING_HTTP_INPUT' => 'HTTP input character conversion is improperly configured', - 'ERROR_MBSTRING_HTTP_INPUT_EXPLAIN' => 'mbstring.http_input must be set to pass. You can check the current value on the PHP information page.', + 'ERROR_MBSTRING_HTTP_INPUT_EXPLAIN' => 'mbstring.http_input must be left empty. You can check the current value on the PHP information page.', 'ERROR_MBSTRING_HTTP_OUTPUT' => 'HTTP output character conversion is improperly configured', - 'ERROR_MBSTRING_HTTP_OUTPUT_EXPLAIN' => 'mbstring.http_output must be set to pass. You can check the current value on the PHP information page.', + 'ERROR_MBSTRING_HTTP_OUTPUT_EXPLAIN' => 'mbstring.http_output must be left empty. You can check the current value on the PHP information page.', + 'ERROR_DEFAULT_CHARSET' => 'Default charset is improperly configured', + 'ERROR_DEFAULT_CHARSET_EXPLAIN' => 'default_charset must be set to UTF-8. You can check the current value on the PHP information page.', 'FILES_PER_DAY' => 'Attachments per day', 'FORUM_STATS' => 'Board statistics',