1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/tests/security/error_log_special_values.phpt
Niels Dossche 7a1bb71127 Fix GH-19480: error_log php.ini cannot be unset when open_basedir is configured
Since the ini message handlers already check for basedir, we need to
drop the basedir check from ini_set. Then we also fix the exceptional
case for the empty string: it should bypass the basedir check.
Furthermore, there was a regression introduced with the error_log
"syslog" check in ddfe269a (inverted check), so we fix that as well.

Closes GH-19487
2025-09-19 14:14:53 +02:00

14 lines
246 B
PHP

--TEST--
Setting error_log to special values with open_basedir enabled
--INI--
open_basedir=foo
error_log=
--FILE--
<?php
var_dump(ini_set("error_log", "syslog"));
var_dump(ini_set("error_log", ""));
?>
--EXPECT--
string(0) ""
string(6) "syslog"