1--TEST--
2Test session_set_save_handler() function : error functionality
3--INI--
4session.save_path=
5session.name=PHPSESSID
6session.save_handler=files
7--EXTENSIONS--
8session
9--SKIPIF--
10<?php include('skipif.inc'); ?>
11--FILE--
12<?php
13
14ob_start();
15
16echo "*** Testing session_set_save_handler() : error functionality ***\n";
17function open($save_path, $session_name) {
18     throw new Exception("Do something bad..!");
19}
20
21function close() { return true; }
22function read($id) { return false; }
23function write($id, $session_data) { }
24function destroy($id) {  return true; }
25function gc($maxlifetime) {  return true; }
26
27session_set_save_handler("open", "close", "read", "write", "destroy", "gc");
28session_start();
29ob_end_flush();
30?>
31--EXPECTF--
32*** Testing session_set_save_handler() : error functionality ***
33
34Fatal error: Uncaught Exception: Do something bad..! in %s:%d
35Stack trace:
36#0 [internal function]: open('', 'PHPSESSID')
37#1 %s(%d): session_start()
38#2 {main}
39  thrown in %s on line %d
40