summaryrefslogtreecommitdiff
path: root/debian/patches/improve_php_5.6_compatibility.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/improve_php_5.6_compatibility.patch')
-rw-r--r--debian/patches/improve_php_5.6_compatibility.patch45
1 files changed, 45 insertions, 0 deletions
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 <bantu@phpbb.com>, Oliver Schramm <oliver.schramm97@gmail.com>
+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 <naderman@naderman.de>
+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 = '<strong style="color:red">' . $lang['NO'] . '</strong>';
+ $passed['mbstring'] = false;