Skip to content

Commit a153fda

Browse files
Closes #4033
1 parent 59a3636 commit a153fda

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

ChangeLog-8.5.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
All notable changes of the PHPUnit 8.5 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.
44

5+
## [8.5.5] - 2020-MM-DD
6+
7+
### Fixed
8+
9+
* [#4033](https://github.com/sebastianbergmann/phpunit/issues/4033: Unexpected behaviour when `$GLOBALS` is deleted
10+
511
## [8.5.4] - 2020-04-23
612

713
### Changed
@@ -52,6 +58,7 @@ All notable changes of the PHPUnit 8.5 release series are documented in this fil
5258
* [#3967](https://github.com/sebastianbergmann/phpunit/issues/3967): Cannot double interface that extends interface that extends `\Throwable`
5359
* [#3968](https://github.com/sebastianbergmann/phpunit/pull/3968): Test class run in a separate PHP process are passing when `exit` called inside
5460

61+
[8.5.5]: https://github.com/sebastianbergmann/phpunit/compare/8.5.4...8.5.5
5562
[8.5.4]: https://github.com/sebastianbergmann/phpunit/compare/8.5.3...8.5.4
5663
[8.5.3]: https://github.com/sebastianbergmann/phpunit/compare/8.5.2...8.5.3
5764
[8.5.2]: https://github.com/sebastianbergmann/phpunit/compare/8.5.1...8.5.2

src/Util/Filter.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,13 @@ private static function shouldPrintFrame($frame, $prefix, Blacklist $blacklist):
7373

7474
$file = $frame['file'];
7575
$fileIsNotPrefixed = $prefix === false || \strpos($file, $prefix) !== 0;
76-
$script = \realpath($GLOBALS['_SERVER']['SCRIPT_NAME']);
76+
77+
// @see https://github.com/sebastianbergmann/phpunit/issues/4033
78+
if (isset($GLOBALS['_SERVER']['SCRIPT_NAME'])) {
79+
$script = \realpath($GLOBALS['_SERVER']['SCRIPT_NAME']);
80+
} else {
81+
$script = '';
82+
}
7783

7884
return \is_file($file) &&
7985
self::fileIsBlacklisted($file, $blacklist) &&

0 commit comments

Comments
 (0)