mirror of
https://github.com/php/php-src.git
synced 2026-03-24 16:22:37 +01:00
Using `php_error_docref()` is preferable since it outputs additional details (which function has been called and whether it is a startup or shutdown error), uses HTML markup, and also provides a link to the documentation, if configured. Since these deprecation warnings have been introduced recently[1][2], i.e. for PHP 8.4, there are no BC concerns. [1] <e8ff7c70f9> [2] <b36eac94d2> Co-authored-by: Máté Kocsis <kocsismate90@gmail.com>
27 lines
763 B
PHP
27 lines
763 B
PHP
--TEST--
|
|
Bug #31454 (session_set_save_handler crashes PHP when supplied non-existent object ref)
|
|
--EXTENSIONS--
|
|
session
|
|
--FILE--
|
|
<?php
|
|
|
|
try {
|
|
session_set_save_handler(
|
|
array(&$arf, 'open'),
|
|
array(&$arf, 'close'),
|
|
array(&$arf, 'read'),
|
|
array(&$arf, 'write'),
|
|
array(&$arf, 'destroy'),
|
|
array(&$arf, 'gc')
|
|
);
|
|
} catch (TypeError $exception) {
|
|
echo $exception->getMessage() . "\n";
|
|
}
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: session_set_save_handler(): Providing individual callbacks instead of an object implementing SessionHandlerInterface is deprecated in %s on line %d
|
|
session_set_save_handler(): Argument #1 ($open) must be a valid callback, first array member is not a valid class name or object
|
|
Done
|