xref: /PHP-7.2/ext/session/tests/bug73100.phpt (revision f1d7e3ca)
1--TEST--
2Bug #73100 (session_destroy null dereference in ps_files_path_create)
3--SKIPIF--
4<?php
5if (!extension_loaded('session')) die('skip session extension not available');
6?>
7--INI--
8session.save_path=
9session.save_handler=files
10--FILE--
11<?php
12ob_start();
13var_dump(session_start());
14session_module_name("user");
15var_dump(session_destroy());
16
17session_module_name("user");
18?>
19===DONE===
20--EXPECTF--
21bool(true)
22
23Warning: session_module_name(): Cannot change save handler module when session is active in %s on line 4
24bool(true)
25
26Recoverable fatal error: session_module_name(): Cannot set 'user' save handler by ini_set() or session_module_name() in %s on line 7
27