MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001429XdebugCode Coveragepublic2017-04-26 14:242017-05-03 13:56
Reporterexussum 
Assigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSUbuntuOS Version16.10
Product Version2.5.3 
Target Version2.5.4Fixed in Version2.5.4 
Summary0001429: Coverage missed on null coalesce
DescriptionRun the file below
Steps To Reproduce<?php
xdebug_start_code_coverage();
$c = [
    $a ?? null,
    $b ?? null
];
var_dump(xdebug_get_code_coverage());


Should return 3 lines 4,5 and 7 currently misses libe 5 ($b ?? null)

Changing the line to $b ?? 0 "fixes" the issue. ie the below returns as expected

<?php
xdebug_start_code_coverage();
$c = [
    $a ?? null,
    $b ?? 0
];
var_dump(xdebug_get_code_coverage());
Additional InformationWent back as far as 2.5.0 still happens there
TagsNo tags attached.
Operating System
PHP Version7.0.20-7.0.24
Attached Files

- Relationships

-  Notes
(0004335)
derick (administrator)
2017-05-03 13:56

Fixed in GIT for Xdebug 2.5.4 - thanks for your report!

- Issue History
Date Modified Username Field Change
2017-04-26 14:24 exussum New Issue
2017-04-29 18:16 eslam Tag Attached: null
2017-04-29 18:17 eslam Tag Detached: null
2017-05-01 10:07 derick Assigned To => derick
2017-05-01 10:07 derick Status new => assigned
2017-05-01 10:08 derick Target Version => 2.5.4
2017-05-03 13:56 derick Note Added: 0004335
2017-05-03 13:56 derick Status assigned => closed
2017-05-03 13:56 derick Resolution open => fixed
2017-05-03 13:56 derick Fixed in Version => 2.5.4


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker