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

[zend-exception] allow Throwable in $previous #112

Merged
merged 1 commit into from
Oct 1, 2021

Conversation

falkenhawk
Copy link
Member

Relax the type declaration to allow passing any type (as typing Throwable would not work in php 5.x) and just let the base Exception class check and throw on invalid type.

Note: The constructor overload must stay because zf1 relies on code being casted to int there in many places (e.g. exceptions coming from PDO, which may have long or string codes...)

The constructor overload must stay because zf1 relies on code being casted to int there in many places (e.g. exceptions coming from PDO, which may have `long` or `string` codes...)
Relax the type declaration to allow passing any type (as typing `Throwable` would not work in php 5.x) and just let the base `Exception` class check and throw on invalid type.
@falkenhawk falkenhawk merged commit abfdc0d into master Oct 1, 2021
@falkenhawk falkenhawk deleted the zend-exception-allow-throwable-as-previous branch October 1, 2021 11:47
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