minor #39418 [PhpUnitBridge] Fix PHP 5.5 compatibility (fancyweb)

This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Fix PHP 5.5 compatibility

| Q             | A
| ------------- | ---
| Branch?       |4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | cf620b6eb3 (commitcomment-44884087)
| License       | MIT
| Doc PR        | -

Thanks to @maximium for spotting it.

Commits
-------

fe7abcd1e9 [PhpUnitBridge] Fix PHP 5.5 compatibility
This commit is contained in:
Alexander M. Turek 2020-12-09 18:10:44 +01:00
commit 75b094cdbb
1 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,7 @@ class Deprecation
/**
* @var string[] Absolute paths to source or tests of the project, cache
* directories exlcuded because it is based on autoloading
* directories excluded because it is based on autoloading
* rules and cache systems typically do not use those
*/
private static $internalPaths = [];
@ -56,10 +56,10 @@ class Deprecation
{
$this->trace = $trace;
if ('trigger_error' === ($trace[1]['function'] ?? null)
&& (DebugClassLoader::class === ($class = $trace[2]['class'] ?? null) || LegacyDebugClassLoader::class === $class)
&& 'checkClass' === ($trace[2]['function'] ?? null)
&& null !== ($extraFile = $trace[2]['args'][1] ?? null)
if ('trigger_error' === (isset($trace[1]['function']) ? $trace[1]['function'] : null)
&& (DebugClassLoader::class === ($class = (isset($trace[2]['class']) ? $trace[2]['class'] : null)) || LegacyDebugClassLoader::class === $class)
&& 'checkClass' === (isset($trace[2]['function']) ? $trace[2]['function'] : null)
&& null !== ($extraFile = (isset($trace[2]['args'][1]) ? $trace[2]['args'][1] : null))
&& '' !== $extraFile
&& false !== $extraFile = realpath($extraFile)
) {