1--TEST--
2Bug #69111 Crash in SessionHandler::read()
3--EXTENSIONS--
4session
5--FILE--
6<?php
7$sh = new SessionHandler;
8session_set_save_handler($sh);
9
10// session_start(); // Uncommenting this makes it not crash when reading the session (see below), but it will not return any data.
11
12try {
13    $sh->open('path', 'name');
14} catch (Error $exception) {
15    echo $exception->getMessage() . "\n";
16}
17
18try {
19    $sh->write("foo", "bar");
20} catch (Error $exception) {
21    echo $exception->getMessage() . "\n";
22}
23
24try {
25    $sh->read("");
26} catch (Error $exception) {
27    echo $exception->getMessage() . "\n";
28}
29
30?>
31--EXPECT--
32Session is not active
33Session is not active
34Session is not active
35