Skip to content

Zend: Exception::__toString() no need to allocate the method name #19025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 29, 2025

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Jul 3, 2025

We can create the FCI/FCC pair ourself outside of the loop as the method getTraceAsString is final

@nielsdos
Copy link
Member

nielsdos commented Jul 3, 2025

Right I remember having to fix that compile issue before. The best way that works on all compilers is just assigning the fields rather than using an initializer.

Girgias and others added 2 commits July 4, 2025 11:53
We can create the FCI/FCC pair ourself outside of the loop as the method getTraceAsString is final

Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
@Girgias Girgias force-pushed the exception-tostring-opt branch from db94226 to f4a7ae7 Compare July 4, 2025 10:53
@Girgias
Copy link
Member Author

Girgias commented Jul 4, 2025

Turns out we still need to do some scope fixes as we are calling the method multiple times.

Not sure what the second loop going through the previous exceptions actually does tho.

@Girgias Girgias marked this pull request as ready for review July 29, 2025 10:45
@Girgias Girgias requested a review from nielsdos July 29, 2025 10:45
@Girgias Girgias merged commit a95a810 into php:master Jul 29, 2025
9 checks passed
@Girgias Girgias deleted the exception-tostring-opt branch July 29, 2025 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants