View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002390 | Xdebug | Uncategorized | public | 2025-11-26 10:36 | 2026-01-22 16:01 |
| Reporter | frozenbrain | Assigned To | derick | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | no change required | ||
| Product Version | 3.4.7 | ||||
| Summary | 0002390: Exception not caught when iterating over a Generator variable with try-finally | ||||
| Description | We've noticed unit tests failing after updating to PHP 8.4.15 because an exception was no longer caught when it should have been. I was unable to reproduce the issue with PHP 8.4.14 or with XDebug disabled which leads me to believe that this is a bug in XDebug. | ||||
| Steps To Reproduce | Run the following script with XDebug enabled (
Expected result: The script should output One thing I noticed while debugging is that the stack trace changes after stepping over the | ||||
| Additional Information | Tested with PHP running in Docker 29.0.2. | ||||
| Tags | No tags attached. | ||||
| Operating System | Fedora 42 | ||||
| PHP Version | 8.4.10-8.4.19 | ||||
|
|
According to a Git Bisect I ran between PHP 8.4.14 an 8.4.15, this is the commit that introduced the issue: https://github.com/php/php-src/commit/12920370e1806584a558799098075510a5ab3444 And just for reference this also affects PHP 8.4.16 with XDebug 3.5.0. |
|
|
I just noticed that this exact issue was apparently fixed in PHP 8.5.2 (not yet released): https://github.com/php/php-src/pull/20716 |
|
|
@frozenbrain — thanks for checking that. I don't know what the reason is either, but I think we probably should wait to see if 8.5.2 fixes this. It should come out today. |
|
|
No longer reproducible on either 8.4.17 or 8.5.2, so this seems to be fixed. |
|
|
This turned out to be a bug in PHP then, thanks for double checking! |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2025-11-26 10:36 | frozenbrain | New Issue | |
| 2026-01-12 13:16 | frozenbrain | Note Added: 0007439 | |
| 2026-01-12 13:58 | frozenbrain | Note Added: 0007440 | |
| 2026-01-15 12:46 | derick | Note Added: 0007448 | |
| 2026-01-19 06:26 | frozenbrain | Note Added: 0007450 | |
| 2026-01-22 16:01 | derick | Assigned To | => derick |
| 2026-01-22 16:01 | derick | Status | new => resolved |
| 2026-01-22 16:01 | derick | Resolution | open => no change required |
| 2026-01-22 16:01 | derick | Note Added: 0007452 |