/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/date/tests/bug70277.phpt
19 строк
576 B
Derick Rethans
Implement More Appropriate Date/Time Exceptions RFC
08 фев 2023, 13:27
08 фев 2023, 13:27
b7860cd
Код
Авторство
О чём код?
--TEST-- Bug #70277 (new DateTimeZone($foo) is ignoring text after null byte) --FILE-- <?php $timezone = "Europe/Zurich\0Foo"; try { var_dump(timezone_open($timezone)); } catch (\ValueError $e) { echo $e::class, ': ', $e->getMessage(), "\n"; } try { var_dump(new DateTimeZone($timezone)); } catch (\ValueError $e) { echo $e::class, ': ', $e->getMessage(), "\n"; } ?> --EXPECT-- ValueError: timezone_open(): Argument #1 ($timezone) must not contain any null bytes ValueError: DateTimeZone::__construct(): Argument #1 ($timezone) must not contain any null bytes