View Issue Details

IDProjectCategoryView StatusLast Update
0001163XdebugUsage problems (Wrong Results)public2015-06-18 09:31
ReporterzorrocaesarAssigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionduplicate 
Product Version2.3.1 
Target VersionFixed in Version2.3.3 
Summary0001163: XDebug casts exception codes to integer
DescriptionWhen a class that extends \Exception overwrites the exception code with a string (this is possible and accepted according to PHP docs) is thrown, the resulting exception, when caught, will cast the string in the exception code to a integer.
Steps To Reproducetry {
    throw new ExceptionWithCodeAsString('Oops!', '5_critical')
} catch ( \Exception $e) {
    var_dump $e->getCode(); // int(5)
}
Additional InformationThis behavior occurs even when no XDebug session is started. Simply removing the extension, will also eliminate this behavior.
TagsNo tags attached.
Operating SystemLinux
PHP Version5.5.20-5.5.25

Relationships

duplicate of 0001133 closedderick PDO exception code value type is changed 

Activities

zorrocaesar

2015-06-18 08:31

reporter   ~0003122

This is a duplicate of: http://bugs.xdebug.org/view.php?id=1160

derick

2015-06-18 09:31

administrator   ~0003123

It's a duplicate of 0001133 too, which I've already fixed. I've verified it with your example too. Thanks for the report!

Issue History

Date Modified Username Field Change
2015-06-18 07:25 zorrocaesar New Issue
2015-06-18 08:31 zorrocaesar Note Added: 0003122
2015-06-18 09:31 derick Note Added: 0003123
2015-06-18 09:31 derick Relationship added duplicate of 0001133
2015-06-18 09:31 derick Status new => resolved
2015-06-18 09:31 derick Fixed in Version => 2.3.3
2015-06-18 09:31 derick Resolution open => duplicate
2015-06-18 09:31 derick Assigned To => derick
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)