Skip to content

Commit 2cd6c3f

Browse files
committed
address third round of PR comments
1 parent e843e06 commit 2cd6c3f

6 files changed

+9
-12
lines changed

Zend/tests/fatal_error_backtraces_001.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
--TEST--
22
Fatal error backtrace
3+
--INI--
4+
fatal_error_backtraces=On
35
--FILE--
46
<?php
57

6-
ini_set('fatal_error_backtraces', true);
7-
88
eval("class Foo {}; class Foo {}");
99
?>
1010
--EXPECTF--

Zend/tests/fatal_error_backtraces_002.phpt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
--TEST--
22
Fatal error backtrace w/ sensitive parameters
3+
--INI--
4+
fatal_error_backtraces=On
35
--FILE--
46
<?php
57

6-
ini_set('fatal_error_backtraces', true);
7-
88
function trigger_fatal(#[\SensitiveParameter] $unused) {
99
eval("class Foo {}; class Foo {}");
1010
}
1111

1212
trigger_fatal("bar");
13-
1413
?>
1514
--EXPECTF--
1615
Fatal error: Cannot redeclare class Foo (%s) in %s : eval()'d code on line %d

Zend/tests/fatal_error_backtraces_003.phpt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
--TEST--
22
Fatal error backtrace w/ zend.exception_ignore_args
3+
--INI--
4+
fatal_error_backtraces=On
5+
zend.exception_ignore_args=On
36
--FILE--
47
<?php
58

6-
ini_set('fatal_error_backtraces', true);
7-
ini_set('zend.exception_ignore_args', true);
8-
99
function trigger_fatal($unused) {
1010
eval("class Foo {}; class Foo {}");
1111
}
1212

1313
trigger_fatal("bar");
14-
1514
?>
1615
--EXPECTF--
1716
Fatal error: Cannot redeclare class Foo (%s) in %s : eval()'d code on line %d

Zend/tests/new_oom.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ $php = PHP_BINARY;
1313

1414
foreach (get_declared_classes() as $class) {
1515
$output = shell_exec("$php --no-php-ini $file $class 2>&1");
16-
if ($output && preg_match('/^\nFatal error: Allowed memory size of [0-9]+ bytes exhausted[^\r\n]* \(tried to allocate [0-9]+ bytes\) in [^\r\n]+ on line [0-9]+\nStack trace:\n(#[0-9]+ [^\r\n]+\n)+$/', $output) !== 1) {
16+
if ($output && preg_match('(^\nFatal error: Allowed memory size of [0-9]+ bytes exhausted[^\r\n]* \(tried to allocate [0-9]+ bytes\) in [^\r\n]+ on line [0-9]+\nStack trace:\n(#[0-9]+ [^\r\n]+\n)+$)', $output) !== 1) {
1717
echo "Class $class failed\n";
1818
echo $output, "\n";
1919
}

Zend/zend.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,6 @@ void zend_startup(zend_utility_functions *utility_functions) /* {{{ */
10501050
CG(map_ptr_size) = 0;
10511051
CG(map_ptr_last) = 0;
10521052
#endif /* ZTS */
1053-
10541053
EG(error_reporting) = E_ALL & ~E_NOTICE;
10551054

10561055
zend_interned_strings_init();

Zend/zend_globals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ struct _zend_executor_globals {
183183

184184
int error_reporting;
185185

186-
int fatal_error_backtraces;
186+
bool fatal_error_backtraces;
187187
zval error_backtrace;
188188

189189
int exit_status;

0 commit comments

Comments
 (0)