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

fix Assert::type() failure error when expected $type is object #425

Merged
merged 1 commit into from Dec 3, 2020

Conversation

jiripudil
Copy link
Contributor

  • bug fix
  • BC break? no
  • doc PR: not necessary

Apparently Assert::type() supports an object instance in place of expected $type, but if such assertion fails, building a failure message produces either an Error: Object of class (...) could not be converted to string, or a rather misleading message if the expected type implements __toString.

@dg
Copy link
Member

dg commented Dec 3, 2020

Thanks

@dg dg merged commit 4b408f5 into nette:master Dec 3, 2020
@jiripudil jiripudil deleted the fix-assert-type branch December 3, 2020 16:26
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