diff options
author | Anatol Belski <ab@php.net> | 2016-01-29 12:27:35 +0100 |
---|---|---|
committer | Ferenc Kovacs <tyrael@php.net> | 2016-02-03 00:58:14 +0100 |
commit | e15b75671cf6ab67a0b6b33fc8798e2adefb39b5 (patch) | |
tree | af51fc4a95d4b0e7af9a4b3c862a35f1868c3e68 | |
parent | a793b709086eed655bc98f933d838b8679b28920 (diff) | |
download | php-git-e15b75671cf6ab67a0b6b33fc8798e2adefb39b5.tar.gz |
add test for bug #69111
-rw-r--r-- | ext/session/tests/bug69111.phpt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/session/tests/bug69111.phpt b/ext/session/tests/bug69111.phpt new file mode 100644 index 0000000000..5fc6e2c9be --- /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) |