1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00
Files
archived-php-src/ext/session/tests/bug73100.phpt
2020-09-22 19:11:30 +01:00

31 lines
693 B
PHP

--TEST--
Bug #73100 (session_destroy null dereference in ps_files_path_create)
--SKIPIF--
<?php
if (!extension_loaded('session')) die('skip session extension not available');
?>
--INI--
session.save_path=
session.save_handler=files
--FILE--
<?php
ob_start();
var_dump(session_start());
session_module_name("user");
var_dump(session_destroy());
try {
session_module_name("user");
} catch (\ValueError $e) {
echo $e->getMessage() . \PHP_EOL;
}
?>
===DONE===
--EXPECTF--
bool(true)
Warning: session_module_name(): Session save handler module cannot be changed when a session is active in %s on line %d
bool(true)
session_module_name(): Argument #1 ($module) cannot be "user"
===DONE===