summaryrefslogtreecommitdiffstats
path: root/lang/php70/files/patch-main_php__ini.c
diff options
context:
space:
mode:
Diffstat (limited to 'lang/php70/files/patch-main_php__ini.c')
-rw-r--r--lang/php70/files/patch-main_php__ini.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/lang/php70/files/patch-main_php__ini.c b/lang/php70/files/patch-main_php__ini.c
new file mode 100644
index 0000000..1d02242
--- /dev/null
+++ b/lang/php70/files/patch-main_php__ini.c
@@ -0,0 +1,31 @@
+--- main/php_ini.c.orig 2017-06-14 13:27:29 UTC
++++ main/php_ini.c
+@@ -280,7 +280,7 @@ static void php_ini_parser_cb(zval *arg1
+ size_t key_len;
+
+ /* PATH sections */
+- if (zend_string_equals_literal_ci(Z_STR_P(arg1), "PATH")) {
++ if (!zend_binary_strncasecmp(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), "PATH", sizeof("PATH") - 1, sizeof("PATH") - 1)) {
+ key = Z_STRVAL_P(arg1);
+ key = key + sizeof("PATH") - 1;
+ key_len = Z_STRLEN_P(arg1) - sizeof("PATH") + 1;
+@@ -291,7 +291,7 @@ static void php_ini_parser_cb(zval *arg1
+ TRANSLATE_SLASHES_LOWER(key);
+
+ /* HOST sections */
+- } else if (zend_string_equals_literal_ci(Z_STR_P(arg1), "HOST")) {
++ } else if (!zend_binary_strncasecmp(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), "HOST", sizeof("HOST") - 1, sizeof("HOST") - 1)) {
+ key = Z_STRVAL_P(arg1);
+ key = key + sizeof("HOST") - 1;
+ key_len = Z_STRLEN_P(arg1) - sizeof("HOST") + 1;
+@@ -328,7 +328,9 @@ static void php_ini_parser_cb(zval *arg1
+ zend_hash_init(Z_ARRVAL(section_arr), 8, NULL, (dtor_func_t) config_zval_dtor, 1);
+ entry = zend_hash_str_update(target_hash, key, key_len, &section_arr);
+ }
+- active_ini_hash = Z_ARRVAL_P(entry);
++ if (Z_TYPE_P(entry) == IS_ARRAY) {
++ active_ini_hash = Z_ARRVAL_P(entry);
++ }
+ }
+ }
+ break;
OpenPOWER on IntegriCloud