]> granicus.if.org Git - php/commitdiff
Registering _SESSION should not segfault.
authorSascha Schumann <sas@php.net>
Thu, 3 Oct 2002 15:48:18 +0000 (15:48 +0000)
committerSascha Schumann <sas@php.net>
Thu, 3 Oct 2002 15:48:18 +0000 (15:48 +0000)
ext/session/tests/012.phpt [new file with mode: 0644]

diff --git a/ext/session/tests/012.phpt b/ext/session/tests/012.phpt
new file mode 100644 (file)
index 0000000..be6326f
--- /dev/null
@@ -0,0 +1,33 @@
+--TEST--
+Registering _SESSION should not segfault.
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.use_cookies=0
+session.cache_limiter=
+register_globals=1
+session.bug_compat_42=1
+session.bug_compat_warn=0
+--FILE--
+<?php
+error_reporting(E_ALL & ~E_NOTICE);
+
+### Absurd example, value of $_SESSION does not matter
+
+session_id("abtest");
+session_start();
+session_register("_SESSION");
+$_SESSION = "kk";
+
+session_write_close();
+
+### Restart to test for $_SESSION brokenness
+
+session_start();
+$_SESSION = "kk";
+session_destroy();
+
+print "I live\n";
+?>
+--EXPECT--
+I live