mirror of
https://github.com/php/php-src.git
synced 2026-03-26 01:02:25 +01:00
* Unify headers already sent errors Now whenever we need to check where headers were already sent in ext/session, we call a single location that prints where, keeping it consistent output wise. * Unify session aready started errors Similar to the one for headers. * Also change session active checks too This usually go hand in hand with the headers already sent checks, but is in a separate commit because of the amount of tests it changes.
39 lines
1010 B
PHP
39 lines
1010 B
PHP
--TEST--
|
|
Bug #80889 (Cannot set save handler when save_handler is invalid)
|
|
--EXTENSIONS--
|
|
session
|
|
--INI--
|
|
session.save_handler=whatever
|
|
--FILE--
|
|
<?php
|
|
$initHandler = ini_get('session.save_handler');
|
|
session_set_save_handler(
|
|
function ($savePath, $sessionName) {
|
|
return true;
|
|
},
|
|
function () {
|
|
return true;
|
|
},
|
|
function ($id) {
|
|
return '';
|
|
},
|
|
function ($id, $data) {
|
|
return true;
|
|
},
|
|
function ($id) {
|
|
return true;
|
|
},
|
|
function ($maxlifetime) {
|
|
return true;
|
|
}
|
|
);
|
|
$setHandler = ini_get('session.save_handler');
|
|
var_dump($initHandler, $setHandler);
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: session_set_save_handler(): Providing individual callbacks instead of an object implementing SessionHandlerInterface is deprecated in %s on line %d
|
|
|
|
Warning: session_set_save_handler(): Session save handler cannot be changed after headers have already been sent (sent from %s on line %d) in %s on line %d
|
|
string(8) "whatever"
|
|
string(8) "whatever"
|