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:
commit
75b094cdbb
@ -41,7 +41,7 @@ class Deprecation
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string[] Absolute paths to source or tests of the project, cache
|
* @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
|
* rules and cache systems typically do not use those
|
||||||
*/
|
*/
|
||||||
private static $internalPaths = [];
|
private static $internalPaths = [];
|
||||||
@ -56,10 +56,10 @@ class Deprecation
|
|||||||
{
|
{
|
||||||
$this->trace = $trace;
|
$this->trace = $trace;
|
||||||
|
|
||||||
if ('trigger_error' === ($trace[1]['function'] ?? null)
|
if ('trigger_error' === (isset($trace[1]['function']) ? $trace[1]['function'] : null)
|
||||||
&& (DebugClassLoader::class === ($class = $trace[2]['class'] ?? null) || LegacyDebugClassLoader::class === $class)
|
&& (DebugClassLoader::class === ($class = (isset($trace[2]['class']) ? $trace[2]['class'] : null)) || LegacyDebugClassLoader::class === $class)
|
||||||
&& 'checkClass' === ($trace[2]['function'] ?? null)
|
&& 'checkClass' === (isset($trace[2]['function']) ? $trace[2]['function'] : null)
|
||||||
&& null !== ($extraFile = $trace[2]['args'][1] ?? null)
|
&& null !== ($extraFile = (isset($trace[2]['args'][1]) ? $trace[2]['args'][1] : null))
|
||||||
&& '' !== $extraFile
|
&& '' !== $extraFile
|
||||||
&& false !== $extraFile = realpath($extraFile)
|
&& false !== $extraFile = realpath($extraFile)
|
||||||
) {
|
) {
|
||||||
|
Reference in New Issue
Block a user