View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001907 | Xdebug | Uncategorized | public | 2020-12-07 18:31 | 2020-12-11 11:18 |
Reporter | nicolas-grekas | Assigned To | derick | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.9.8 | ||||
Fixed in Version | 3.0.2 | ||||
Summary | 0001907: Empty exception message when setting the $message property to a stringable object | ||||
Description | As hinted in https://github.com/symfony/symfony/pull/39196, xdebug changes the behavior of PHP when the Exception::$message property is set to a stringable object. The following script yields an empty output when run with xdebug enabled, and echoes 'Hello World' on PHP (all versions >=7.0). <?php class LazyException extends Exception
} $e = new LazyException(); try { | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 7.4.0-7.4.4 | ||||
|
I suppose this happens because the code in src/develop/stack.c tries to populate the "xdebug_message" property, but doesn't handle objects there. A simple fix could be to cast the object to string, but this would break the laziness property. |
|
|
Date Modified | Username | Field | Change |
---|---|---|---|
2020-12-07 18:31 | nicolas-grekas | New Issue | |
2020-12-08 11:32 | nicolas-grekas | Note Added: 0005574 | |
2020-12-10 16:34 | derick | Assigned To | => derick |
2020-12-10 16:34 | derick | Status | new => confirmed |
2020-12-11 10:57 | derick | Note Added: 0005582 | |
2020-12-11 11:18 | derick | Status | confirmed => closed |
2020-12-11 11:18 | derick | Resolution | open => fixed |
2020-12-11 11:18 | derick | Fixed in Version | => 3.0.2 |