summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-04-08 11:11:58 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-04-08 11:11:58 +0200
commiteea61cda7df1466a1f40a17c21b65901c1c68ce0 (patch)
tree647ab53dd10481db538e5e67c182b671319d4623 /ext
parentd1d692abe71b04177747758237249253b175b8c2 (diff)
downloadphp-git-eea61cda7df1466a1f40a17c21b65901c1c68ce0.tar.gz
Fixed bug #77844
We should probably return an integer result from the operation in typed mode, right now the result is always a string.
Diffstat (limited to 'ext')
-rw-r--r--ext/standard/tests/general_functions/bug77844.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/standard/tests/general_functions/bug77844.phpt b/ext/standard/tests/general_functions/bug77844.phpt
new file mode 100644
index 0000000000..a8b6bf3d0d
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug77844.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Bug #77844: Crash due to null pointer in parse_ini_string with INI_SCANNER_TYPED
+--FILE--
+<?php
+
+$ini = <<<INI
+val1=3.7&2
+val2=2&3.7
+INI;
+var_dump(parse_ini_string($ini, true, INI_SCANNER_TYPED));
+
+?>
+--EXPECT--
+array(2) {
+ ["val1"]=>
+ string(1) "2"
+ ["val2"]=>
+ string(1) "2"
+}