Skip to content
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

[11.x] Improved exception message on 'ensure' method #50517

Merged

Conversation

fgaroby
Copy link
Contributor

@fgaroby fgaroby commented Mar 13, 2024

This PR improves the returned message, when the Collection::ensure method throws an UnexpectedValueException.
For now on, we know what position (0-based index) the wrong value is.

- Collection should only include [stdClass] items, but 'string' found.
+ Collection should only include [stdClass] items, but 'string' found at position 3.

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.

None yet

2 participants