mirror of
https://github.com/php/php-src.git
synced 2026-04-30 03:33:17 +02:00
a85666c17b
Closes GH-17541 Closes GH-17546
25 lines
591 B
PHP
25 lines
591 B
PHP
--TEST--
|
|
GH-17541 (ext/session NULL pointer dereferencement during ID reset)
|
|
--EXTENSIONS--
|
|
session
|
|
--SKIPIF--
|
|
<?php include('skipif.inc'); ?>
|
|
--FILE--
|
|
<?php
|
|
function errorHandler($errorNumber, $errorMessage, $fileName, $lineNumber) {
|
|
// Destroy session while emitting warning from the bogus session name in session_start
|
|
session_destroy();
|
|
}
|
|
|
|
set_error_handler('errorHandler');
|
|
|
|
ob_start();
|
|
var_dump(session_name("\t"));
|
|
var_dump(session_start());
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Warning: session_destroy(): Trying to destroy uninitialized session in %s on line %d
|
|
string(9) "PHPSESSID"
|
|
bool(true)
|