-
Notifications
You must be signed in to change notification settings - Fork 7.9k
hash_file() appears to be restricted to 3 arguments #11180
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
Comments
Looking at 110b4e9 it would indeed seem like an oversight where |
Feel free to submit a PR :) |
BTW, the mentioned commit that introduced the 4th argument also did not include a test for hash() call with 4 arguments. Unless I'm mistaken and it is not required when do a test using named arguments syntax. |
The options argument only affects murmurhash right now, and there is a test for that. I'll go ahead and fix hash_file and add a test. |
* PHP-8.1: Fix GH-11180: hash_file() appears to be restricted to 3 arguments
* PHP-8.2: Fix GH-11180: hash_file() appears to be restricted to 3 arguments
Uh oh!
There was an error while loading. Please reload this page.
Description
According to hash_file(), the function takes in 4 arguments, the latest one being an
$options
array, however it does not seem to accept 4 arguments.The following code:
Resulted in this output:
But I expected this output instead:
Shouldn't the
ZEND_PARSE_PARAMETERS_START(2, 3)
actually beZEND_PARSE_PARAMETERS_START(2, 4)
here:php-src/ext/hash/hash.c
Line 453 in 0e5ac62
PHP Version
PHP 8.1.18
Operating System
Ubuntu 23.04
The text was updated successfully, but these errors were encountered: