Skip to content

Conversation

@outdooracorn
Copy link
Contributor

The Postpone exception throwing commit reverts a fix from #60.

If the "op" field is boolean true, it is interpreted as an "add" operation instead of throwing an exception. This is due to true always matching the first switch case (Add::OP)

My bad for not covering it in a test!

This draft PR is to demonstrate the issue. How would you like to fix it?

@vearutop
Copy link
Member

vearutop commented Nov 8, 2022

Oh, my bad, then I think it would be best to reapply your fix (move is_string check back to where it was, before the switch).

@vearutop
Copy link
Member

vearutop commented Nov 8, 2022

(With more focus on Go these days, I'm losing my grip on PHP quirks 😅)

@outdooracorn
Copy link
Contributor Author

No worries, happens to the best of us 😉

Closing this draft in preference of #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants