Skip to content

Throw error for recursive comparison, instead of fatal #14989

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 1 commit into from
Jul 22, 2024

Conversation

iluuu1994
Copy link
Member

I don't understand the rationale of fatal erroring here. It seems this should properly unprotect the compared elements when returning up the stack. If there's another reason I'm missing, please let me know.

Related to GH-14980

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why it would need to throw a Fatal Error, converting to an exception Error seems sensible to me.

@@ -0,0 +1,21 @@
--TEST--
Comparison of a recursive array leads throws a catchable error
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title here is a bit weird?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, double verb sneaked in there. ^^

Copy link
Member

@dstogov dstogov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any problems

@iluuu1994 iluuu1994 force-pushed the recursive-comparison-fatal-to-error branch from 7b9d97f to 1e0cd19 Compare July 22, 2024 13:52
I don't understand the rationale of fatal erroring here. It seems this should
properly unprotect the compared elements when returning up the stack.

Related to phpGH-14980
@iluuu1994 iluuu1994 force-pushed the recursive-comparison-fatal-to-error branch from 1e0cd19 to fc07043 Compare July 22, 2024 13:53
@iluuu1994 iluuu1994 merged commit 82479e8 into php:master Jul 22, 2024
8 of 11 checks passed
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.

3 participants