-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix enchant stub #5500
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 enchant stub #5500
Conversation
`enchant_broker_list_dicts()` and `enchant_broker_describe()` return `null` if no broker is available.
@remicollet, what do you think? |
Does it really return null? PHP_ENCHANT_GET_BROKER returns false if no broker available (it should throw instead). |
|
@cmb69 I see. In that case I'd say this definitely should array_init(return_value) beforehand. |
It's ok for PHP 8. |
I agree that the minor BC break would be acceptable for PHP 8, especially since this is only relevant if the extension is not really usable (i.e. has no brokers or dicts). On the other hand, I think sticking with Anyhow, @remicollet has incorporated this in PR #5528, so this PR can be closed. |
This issue does not seem related to the object migration, so it would be preferable to address it independently. |
Okay, makes sense. @remicollet, could you please revert these changes from PR #5528. |
Applied in c1ad916 |
enchant_broker_list_dicts()
andenchant_broker_describe()
returnnull
if no broker is available.Alternatively, we could change the implementation to return an empty array in this case.