From a8c22829d8e8845cd4ddf4ef8b61a1ed79edfffc Mon Sep 17 00:00:00 2001 From: Olivier Gayot Date: Mon, 12 Mar 2018 22:57:42 +0100 Subject: Imported from the SVN repository http://svn.wolffelaar.nl/wsvn/phpbb/branches/jessie/ Signed-off-by: Olivier Gayot --- debian/patches/improve_php_5.6_compatibility.patch | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 debian/patches/improve_php_5.6_compatibility.patch (limited to 'debian/patches/improve_php_5.6_compatibility.patch') diff --git a/debian/patches/improve_php_5.6_compatibility.patch b/debian/patches/improve_php_5.6_compatibility.patch new file mode 100644 index 0000000..67f44e8 --- /dev/null +++ b/debian/patches/improve_php_5.6_compatibility.patch @@ -0,0 +1,45 @@ +Description: Handle mbstring.http_{in,out}put for PHP 5.6 + Having mbstring.http_input set to '' is as good as 'pass'. + Fix mbstring warnings in ACP for PHP 5.6 compatibility. +Author: Andreas Fischer , Oliver Schramm +Origin: upstream +Bug: https://tracker.phpbb.com/browse/PHPBB3-12468 https://tracker.phpbb.com/browse/PHPBB3-13168 +Applied-Upstream: commit, https://github.com/phpbb/phpbb/commit/370015c1a5f490a7fae85da268b81cb8d1748f50 https://github.com/phpbb/phpbb/commit/53f166274aaa55b98a1c671dbb5cbd403d879157 +Reviewed-by: Nils Adermann +Last-Update: 2015-02-02 +--- a/includes/acp/acp_main.php ++++ b/includes/acp/acp_main.php +@@ -610,8 +610,8 @@ + 'S_MBSTRING_LOADED' => true, + 'S_MBSTRING_FUNC_OVERLOAD_FAIL' => (intval(@ini_get('mbstring.func_overload')) & (MB_OVERLOAD_MAIL | MB_OVERLOAD_STRING)), + 'S_MBSTRING_ENCODING_TRANSLATION_FAIL' => (@ini_get('mbstring.encoding_translation') != 0), +- 'S_MBSTRING_HTTP_INPUT_FAIL' => (@ini_get('mbstring.http_input') != 'pass'), +- 'S_MBSTRING_HTTP_OUTPUT_FAIL' => (@ini_get('mbstring.http_output') != 'pass'), ++ 'S_MBSTRING_HTTP_INPUT_FAIL' => !in_array(@ini_get('mbstring.http_input'), array('pass', '')), ++ 'S_MBSTRING_HTTP_OUTPUT_FAIL' => !in_array(@ini_get('mbstring.http_output'), array('pass', '')), + )); + } + +--- a/install/install_install.php ++++ b/install/install_install.php +@@ -273,8 +273,8 @@ + $checks = array( + array('func_overload', '&', MB_OVERLOAD_MAIL|MB_OVERLOAD_STRING), + array('encoding_translation', '!=', 0), +- array('http_input', '!=', 'pass'), +- array('http_output', '!=', 'pass') ++ array('http_input', '!=', array('pass', '')), ++ array('http_output', '!=', array('pass', '')) + ); + + foreach ($checks as $mb_checks) +@@ -295,7 +295,8 @@ + break; + + case '!=': +- if ($ini_val != $mb_checks[2]) ++ if (!is_array($mb_checks[2]) && $ini_val != $mb_checks[2] || ++ is_array($mb_checks[2]) && !in_array($ini_val, $mb_checks[2])) + { + $result = '' . $lang['NO'] . ''; + $passed['mbstring'] = false; -- cgit v1.2.3