/
vshmidt
/
php
Обзор
Документация
Войти
/
vshmidt
/
php
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
ext/xsl/tests/maxTemplateDepth_errors.phpt
44 строки
947 B
Niels Dossche
Implement request #71571: XSLT processor should provide option to change maxDepth (#13731)
31 мар 2024, 22:21
Не верифицирован
31 мар 2024, 22:21
30885f3
Код
Авторство
О чём код?
--TEST-- XSLTProcessor::$maxTemplateDepth errors --EXTENSIONS-- xsl --INI-- error_reporting=E_ALL & ~E_DEPRECATED --FILE-- <?php $processor = new XSLTProcessor; $oldValue = $processor->maxTemplateDepth; try { $processor->maxTemplateDepth = -1; } catch (ValueError $e) { echo $e->getMessage(), "\n"; } var_dump($processor->maxTemplateDepth === $oldValue); try { $processor->maxTemplateDepth = -32.1; } catch (ValueError $e) { echo $e->getMessage(), "\n"; } var_dump($processor->maxTemplateDepth === $oldValue); try { $processor->maxTemplateDepth = "-1"; } catch (ValueError $e) { echo $e->getMessage(), "\n"; } var_dump($processor->maxTemplateDepth === $oldValue); ?> --EXPECT-- XSLTProcessor::$maxTemplateDepth must be greater than or equal to 0 bool(true) XSLTProcessor::$maxTemplateDepth must be greater than or equal to 0 bool(true) XSLTProcessor::$maxTemplateDepth must be greater than or equal to 0 bool(true)