1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

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
This commit is contained in:
Niels Dossche
2025-08-15 11:06:53 +02:00
committed by Arnaud Le Blanc
parent 6eb3faef3b
commit 7a1bb71127
4 changed files with 23 additions and 8 deletions

View File

@@ -0,0 +1,13 @@
--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"