com php-src: add test for bug #69111: ext/session/tests/bug69111.phpt
| From: | Anatol Belski | Date: | Fri, 29 Jan 2016 11:27:35 +0000 |
| Subject: | com php-src: add test for bug #69111: ext/session/tests/bug69111.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-90785@lists.php.net to get a copy of this message | ||
Commit: 4b0feeb8fabb2be2c5e5c3ab8d4cfac733651344
Author: Anatol Belski <ab@php.net> Fri, 29 Jan 2016 12:27:35 +0100
Parents: efb667e683692daec3a4c746a00c765a858336c0
Branches: PHP-5.6 PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4b0feeb8fabb2be2c5e5c3ab8d4cfac733651344
Log:
add test for bug #69111
Bugs:
https://bugs.php.net/69111
Changed paths:
A ext/session/tests/bug69111.phpt
Diff:
diff --git a/ext/session/tests/bug69111.phpt b/ext/session/tests/bug69111.phpt
new file mode 100644
index 0000000..5fc6e2c
--- /dev/null
+++ b/ext/session/tests/bug69111.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #69111 Crash in SessionHandler::read()
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--FILE--
+<?php
+$sh = new SessionHandler;
+session_set_save_handler($sh);
+
+$savePath = ini_get('session.save_path');
+$sessionName = ini_get('session.name');
+
+// session_start(); // Uncommenting this makes it not crash when reading the session (see below),
but it will not return any data.
+
+$sh->open($savePath, $sessionName);
+$sh->write("foo", "bar");
+var_dump($sh->read(@$id));
+?>
+--EXPECTF--
+bool(false)