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

Exceptions cannot be thrown in magic __toString #27

Merged
merged 3 commits into from
Jul 23, 2015
Merged

Conversation

wilsonge
Copy link
Contributor

@wilsonge wilsonge commented Jul 8, 2015

This is a PHP requirement. If an exception goes uncaught in a __toString() magic method then a PHP Fatal Error is generated

break;
}
}
catch (Exception $e)
Copy link
Contributor

Choose a reason for hiding this comment

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

Need the leading slash on Exception

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

mbabker added a commit that referenced this pull request Jul 23, 2015
Exceptions cannot be thrown in magic __toString
@mbabker mbabker merged commit 5b8e5b6 into master Jul 23, 2015
@mbabker mbabker deleted the exceptions-tostring branch July 23, 2015 13:19
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