MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001218XdebugUsage problems (Wrong Results)public2015-11-30 10:482015-12-07 11:32
Reporterderick 
Assigned Toderick 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.4.0rc1 
Target Version2.4.0Fixed in Version2.4.0rc2 
Summary0001218: Xdebug messes with the exception code, by casting it to int
DescriptionWith:

<?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 [^])
TagsNo tags attached.
Operating System
PHP Version7.0.0rc7
Attached Files

- Relationships

-  Notes
(0003274)
derick (administrator)
2015-12-01 21:14

Fixed for 2.4.0 - thanks for the report!

- Issue History
Date Modified Username Field Change
2015-11-30 10:48 derick New Issue
2015-12-01 21:14 derick Note Added: 0003274
2015-12-01 21:14 derick Status new => closed
2015-12-01 21:14 derick Assigned To => derick
2015-12-01 21:14 derick Resolution open => fixed
2015-12-01 21:14 derick Fixed in Version => 2.4.0
2015-12-07 11:32 derick Fixed in Version 2.4.0 => 2.4.0rc2
2016-07-31 13:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 13:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker