Skip to content

Conversation

@ndossche
Copy link
Member

We could also chain the exceptions, but the current code keeps the existing behaviour by adding EG(exception) checks.

We could also chain the exceptions, but the current code keeps the
existing behaviour by adding EG(exception) checks.
Comment on lines 1737 to 1739
if (!EG(exception)) {
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Unable to instantiate directory iterator for %s", phar_obj->archive->fname);
}
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to not have an exception?

Copy link
Member Author

Choose a reason for hiding this comment

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

Heh, yeah I think you're right. Time to drop more code!

Copy link
Member

Choose a reason for hiding this comment

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

Sometimes I design reasonable APIs :p

@ndossche ndossche merged commit f2f45f3 into php:master Oct 14, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants