summaryrefslogtreecommitdiff
path: root/ext/standard/tests/general_functions/bug76643.phpt
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2018-07-24 12:20:13 +0200
committerChristoph M. Becker <cmbecker69@gmx.de>2018-07-24 12:20:13 +0200
commit40bd84d3e3d3fefdc16c10319e35fcfea359054a (patch)
treea2308e4675a755ec5f1c1c94b7c7c8cae01bea33 /ext/standard/tests/general_functions/bug76643.phpt
parent38d97557da2614f5fe1d0fa64f33dfb2cf6cbaad (diff)
downloadphp-git-40bd84d3e3d3fefdc16c10319e35fcfea359054a.tar.gz
Fix #76643: Segmentation fault when using `output_add_rewrite_var`
We have to check whether _SERVER is actually an array before we're going to use it as such.
Diffstat (limited to 'ext/standard/tests/general_functions/bug76643.phpt')
-rw-r--r--ext/standard/tests/general_functions/bug76643.phpt12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/standard/tests/general_functions/bug76643.phpt b/ext/standard/tests/general_functions/bug76643.phpt
new file mode 100644
index 0000000000..47b5345860
--- /dev/null
+++ b/ext/standard/tests/general_functions/bug76643.phpt
@@ -0,0 +1,12 @@
+--TEST--
+Bug #76643 (Segmentation fault when using `output_add_rewrite_var`)
+--FILE--
+<?php
+$_SERVER = 'foo';
+output_add_rewrite_var('bar', 'baz');
+?>
+<form action="http://example.com/"></form>
+===DONE===
+--EXPECT--
+<form action="http://example.com/"></form>
+===DONE===