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 | |||
| 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. |
|
|
|