View Issue Details

IDProjectCategoryView StatusLast Update
0001448XdebugCode Coveragepublic2017-07-22 08:28
Reporternickel715 Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
PlatformLinuxOSDebianOS Version8
Product Version2.5.1 
Summary0001448: Line covered even though not all
Description

I'm not sure if xdebug code coverage is intended to detect this, but I like to write php code like this:
!empty($var) && doSomething($var);

unfortunately this line is covered event though doSomething gets not executed.

Steps To Reproduce

I provide some example code to reproduce it

TagsNo tags attached.
Operating SystemLinux
PHP Version7.1.5-7.1.9

Activities

derick

2017-07-22 08:28

administrator   ~0004380

Although "doSomething" doesn't get executed, the !empty is executed. Xdebug can't really tell the difference as PHP just provides line numbers - and some of this line is executed.

So this is how it correctly works.