Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--TEST-- | ||
Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) | ||
--INI-- | ||
session.save_path= | ||
session.name=PHPSESSID | ||
--SKIPIF-- | ||
<?php include('skipif.inc'); ?> | ||
--FILE-- | ||
<?php | ||
|
||
ob_start(); | ||
|
||
function open($save_path, $session_name) { | ||
return true; | ||
} | ||
|
||
function close() { | ||
die("close: goodbye cruel world\n"); | ||
} | ||
|
||
function read($id) { | ||
return ''; | ||
} | ||
|
||
function write($id, $session_data) { | ||
die("write: goodbye cruel world\n"); | ||
} | ||
|
||
function destroy($id) { | ||
return true; | ||
} | ||
|
||
function gc($maxlifetime) { | ||
return true; | ||
} | ||
|
||
session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc'); | ||
session_start(); | ||
session_write_close(); | ||
echo "um, hi\n"; | ||
|
||
?> | ||
--EXPECTF-- | ||
write: goodbye cruel world | ||
close: goodbye cruel world |