-
Notifications
You must be signed in to change notification settings - Fork 7.9k
zend_hash_sort always returns SUCCESS #3936
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
Conversation
Hmm, if it always returns true then perhaps we should simply change it to return void? However if its ZEND_API then most likely only master/PHP-7.4 only |
@KalleZ Some extensions may use this return value |
@rjhdby well yes, and if they do, then they should be encouraged to change it, hence why patching it in 7.4 or 8.0 makes sense to keep ABI, migration path is rather easy and still cross version compatible (as your patch already displays) |
@KalleZ done |
If we're going to change the return type of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
Merged as e86cdce. |
Do you all imply that a check like Solr does in https://github.com/php/pecl-search_engine-solr/blob/master/src/php7/php_solr_input_document.c#L658 is senseless?
Would this never return FALSE? And/or Is the change in 33ef3d6 related? |
And shouldn't this change be documented in UPGRADING.INTERNALS? |
@Jan-E the only reason Anyway, the signature change is now documented: 942f341. |
OK, so the new PHP8 (and even PHP7) code for Solr should be
And a comparable change for ereg (yeah, I know): |
yes :) |
Did you mean to stress the change ;) |
Well, both the signature of zend_hash_function, and the signature of the zend_hash_sort compare function has been changed. Not sure how to express that better. |
Or should it be read as
|
zend_hash_sort (zend_hash_sort_ex) never returns FAILURE