/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/session/tests/user_session_module/bug61728.phpt
44 строки
808 B
DanielEScherzer
Deprecate returning non-string values from a user output handler (#18932)
08 июл 2025, 00:31
Не верифицирован
08 июл 2025, 00:31
d8577d9
Код
Авторство
О чём код?
--TEST-- Bug #61728 (PHP crash when calling ob_start in request_shutdown phase) --EXTENSIONS-- session --FILE-- <?php function output_html($ext) { return (string)strlen($ext); } class MySessionHandler implements SessionHandlerInterface { function open ($save_path, $session_name): bool { return true; } function close(): bool { return true; } function read ($id): string { return ''; } function write ($id, $sess_data): bool { ob_start("output_html"); echo "laruence"; ob_end_flush(); return true; } function destroy ($id): bool { return true; } function gc ($maxlifetime): int { return 1; } } session_set_save_handler(new MySessionHandler()); session_start(); ?> --EXPECT-- 8