MantisBT - Xdebug
View Issue Details
0001218XdebugUsage problems (Wrong Results)public2015-11-30 10:482015-12-07 11:32
derick 
derick 
normalmajoralways
closedfixed 
2.4.0rc1 
2.4.02.4.0rc2 
7.0.0rc7
0001218: Xdebug messes with the exception code, by casting it to int
With:

<?php

class StringCodeException extends Exception
{
    public function __construct()
    {
        $this->code = 'SomeString';
    }
}

$e = new StringCodeException;

try {
    throw $e;
} catch (StringCodeException $e) {
    var_dump($e->getCode());
}
?>

With xdebug loaded:
int(0)

otherwise:
string(10) "SomeString"

(As per https://github.com/sebastianbergmann/phpunit/issues/1972#issuecomment-160537077 [^])
No tags attached.
Issue History
2015-11-30 10:48derickNew Issue
2015-12-01 21:14derickNote Added: 0003274
2015-12-01 21:14derickStatusnew => closed
2015-12-01 21:14derickAssigned To => derick
2015-12-01 21:14derickResolutionopen => fixed
2015-12-01 21:14derickFixed in Version => 2.4.0
2015-12-07 11:32derickFixed in Version2.4.0 => 2.4.0rc2
2016-07-31 13:36derickCategoryUsage problems => Usage problems (Crashes)
2016-07-31 13:38derickCategoryUsage problems (Crashes) => Usage problems (Wrong Results)

Notes
(0003274)
derick   
2015-12-01 21:14   
Fixed for 2.4.0 - thanks for the report!