1--TEST--
2Test session_set_save_handler() function : error functionality
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--FILE--
6<?php
7
8ob_start();
9
10/*
11 * Prototype : bool session_set_save_handler(callback $open, callback $close, callback $read, callback $write, callback $destroy, callback $gc)
12 * Description : Sets user-level session storage functions
13 * Source code : ext/session/session.c
14 */
15
16echo "*** Testing session_set_save_handler() : error functionality ***\n";
17
18function callback() { return true; }
19
20session_set_save_handler("callback", "callback", "callback", "callback", "callback", "callback");
21session_set_save_handler("callback", "echo", "callback", "callback", "callback", "callback");
22session_set_save_handler("callback", "callback", "echo", "callback", "callback", "callback");
23session_set_save_handler("callback", "callback", "callback", "echo", "callback", "callback");
24session_set_save_handler("callback", "callback", "callback", "callback", "echo", "callback");
25session_set_save_handler("callback", "callback", "callback", "callback", "callback", "echo");
26session_set_save_handler("callback", "callback", "callback", "callback", "callback", "callback");
27session_start();
28ob_end_flush();
29?>
30--EXPECTF--
31*** Testing session_set_save_handler() : error functionality ***
32
33Warning: session_set_save_handler(): Argument 2 is not a valid callback in %s on line %d
34
35Warning: session_set_save_handler(): Argument 3 is not a valid callback in %s on line %d
36
37Warning: session_set_save_handler(): Argument 4 is not a valid callback in %s on line %d
38
39Warning: session_set_save_handler(): Argument 5 is not a valid callback in %s on line %d
40
41Warning: session_set_save_handler(): Argument 6 is not a valid callback in %s on line %d
42