Skip to content

Conversation

nielsdos
Copy link
Member

We can make a variant of the macro to control the throwing behaviour.

We can make a variant of the macro to control the throwing behaviour.
@nielsdos nielsdos force-pushed the phar-duplicated-code-2 branch from f009955 to 245c840 Compare October 11, 2025 12:38
Comment on lines +4526 to +4527
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, \
"Cannot call method on an uninitialized PharFileInfo object"); \
Copy link
Member

Choose a reason for hiding this comment

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

Note for a follow-up PR. This should probably converted to a standard Error exception as all other "attempting to do something on uninitialized object" exceptions

Copy link
Member Author

Choose a reason for hiding this comment

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

If we do that we should do an entire pass over ext/phar so it is consistently fixed

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, which is why this is future scope :)

@nielsdos nielsdos merged commit f97ee5c into php:master Oct 11, 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