Skip to content

Commit 0906270

Browse files
committed
Revert "Remove no longer used "log_errors_max_len" ini directive (#6838)"
This reverts commit d2d227e. This is an ABI break.
1 parent c2b5284 commit 0906270

File tree

14 files changed

+29
-7
lines changed

14 files changed

+29
-7
lines changed

NEWS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ PHP NEWS
88
. Fixed bug #67792 (HTTP Authorization schemes are treated as case-sensitive).
99
(cmb)
1010
. Fixed bug #80972 (Memory exhaustion on invalid string offset). (girgias)
11-
. Removed log_errors_max_len ini directive from default ini files, since it
12-
no longer had any effect since PHP 8.0.0. (Michael Voříšek)
1311

1412
- FTP:
1513
. Fixed bug #80901 (Info leak in ftp extension). (cmb)

UPGRADING

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,10 +1124,6 @@ PHP 8.0 UPGRADE NOTES
11241124
. New INI directive to choose the version of the .NET framework to use for
11251125
dotnet objects.
11261126

1127-
- log_errors_max_len
1128-
. INI directive for setting the maximum length of log_errors in bytes no
1129-
longer has any effect and has been removed.
1130-
11311127
========================================
11321128
12. Windows Support
11331129
========================================

ext/ftp/tests/bug80901.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Bug #80901 (Info leak in ftp extension)
44
<?php
55
require 'skipif.inc';
66
?>
7+
--INI--
8+
log_errors_max_len=0
79
--FILE--
810
<?php
911
$bug80901 = true;

ext/oci8/tests/error3.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ if ($cv[0] < 11 || ($cv[0] == 11 && $cv[1] < 2) || ($cv[0] == 11 && $cv[1] == 2
1010
die("skip test works only with Oracle 11.2.0.3 or greater version of Oracle client libraries");
1111
}
1212
?>
13+
--INI--
14+
log_errors_max_len=4096
1315
--FILE--
1416
<?php
1517

ext/standard/tests/dir/bug80960.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Fix #80960 (opendir() warning wrong info when failed on Windows)
44
<?php
55
if (PHP_OS_FAMILY !== "Windows") die("skip for Windows only");
66
?>
7+
--INI--
8+
log_errors_max_len=0
79
--FILE--
810
<?php
911
opendir("notexist*");

ext/standard/tests/file/parse_ini_file_variation3.phpt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ error_reporting = E_ALL
3333
display_errors = On
3434
display_startup_errors = Off
3535
log_errors = Off
36+
log_errors_max_len = 1024
3637
ignore_repeated_errors = Off
3738
ignore_repeated_source = Off
3839
report_memleaks = On
@@ -68,7 +69,7 @@ foreach($newdirs as $newdir) {
6869
--EXPECTF--
6970
*** Testing parse_ini_file() : variation ***
7071
New include path is : %sparse_ini_file_variation3.dir1%sparse_ini_file_variation3.dir2%sparse_ini_file_variation3.dir3%S
71-
array(9) {
72+
array(10) {
7273
["error_reporting"]=>
7374
string(5) "32767"
7475
["display_errors"]=>
@@ -77,6 +78,8 @@ array(9) {
7778
string(0) ""
7879
["log_errors"]=>
7980
string(0) ""
81+
["log_errors_max_len"]=>
82+
string(4) "1024"
8083
["ignore_repeated_errors"]=>
8184
string(0) ""
8285
["ignore_repeated_source"]=>

ext/standard/tests/strings/006.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
--TEST--
22
highlight_file() and output buffer
3+
--INI--
4+
log_errors_max_len=4096
35
--FILE--
46
<?php
57

ext/standard/tests/strings/007-win32.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
php_strip_whitespace() and output buffer
33
--SKIPIF--
44
<?php if( substr(PHP_OS, 0, 3) != "WIN") die('skip Windows only test');?>
5+
--INI--
6+
log_errors_max_len=4096
57
--FILE--
68
<?php
79
$file = str_repeat("A", PHP_MAXPATHLEN - strlen(__DIR__ . DIRECTORY_SEPARATOR . __FILE__));

ext/standard/tests/strings/007.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
php_strip_whitespace() and output buffer
33
--SKIPIF--
44
<?php if( substr(PHP_OS, 0, 3) == "WIN") die('skip Non windows test');?>
5+
--INI--
6+
log_errors_max_len=4096
57
--FILE--
68
<?php
79
$file = str_repeat("A", PHP_MAXPATHLEN - strlen(__DIR__ . DIRECTORY_SEPARATOR . __FILE__));

main/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,7 @@ PHP_INI_BEGIN()
659659
STD_PHP_INI_BOOLEAN("ignore_user_abort", "0", PHP_INI_ALL, OnUpdateBool, ignore_user_abort, php_core_globals, core_globals)
660660
STD_PHP_INI_BOOLEAN("implicit_flush", "0", PHP_INI_ALL, OnUpdateBool, implicit_flush, php_core_globals, core_globals)
661661
STD_PHP_INI_BOOLEAN("log_errors", "0", PHP_INI_ALL, OnUpdateBool, log_errors, php_core_globals, core_globals)
662+
STD_PHP_INI_ENTRY("log_errors_max_len", "1024", PHP_INI_ALL, OnUpdateLong, log_errors_max_len, php_core_globals, core_globals)
662663
STD_PHP_INI_BOOLEAN("ignore_repeated_errors", "0", PHP_INI_ALL, OnUpdateBool, ignore_repeated_errors, php_core_globals, core_globals)
663664
STD_PHP_INI_BOOLEAN("ignore_repeated_source", "0", PHP_INI_ALL, OnUpdateBool, ignore_repeated_source, php_core_globals, core_globals)
664665
STD_PHP_INI_BOOLEAN("report_memleaks", "1", PHP_INI_ALL, OnUpdateBool, report_memleaks, php_core_globals, core_globals)

0 commit comments

Comments
 (0)