Skip to content

Commit 1e641a3

Browse files
committed
Docs: Correct the documented types of the password algorithm constants in PHP 7.3 and earlier.
See #63166 git-svn-id: https://develop.svn.wordpress.org/trunk@60297 602fd350-edb4-49c9-b593-d223f7449a82
1 parent c1f2216 commit 1e641a3

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/wp-includes/pluggable.php

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2676,9 +2676,11 @@ function wp_hash_password(
26762676
* - `PASSWORD_ARGON2ID`
26772677
* - `PASSWORD_DEFAULT`
26782678
*
2679+
* The values of the algorithm constants are strings in PHP 7.4+ and integers in PHP 7.3 and earlier.
2680+
*
26792681
* @since 6.8.0
26802682
*
2681-
* @param string $algorithm The hashing algorithm. Default is the value of the `PASSWORD_BCRYPT` constant.
2683+
* @param string|int $algorithm The hashing algorithm. Default is the value of the `PASSWORD_BCRYPT` constant.
26822684
*/
26832685
$algorithm = apply_filters( 'wp_hash_password_algorithm', PASSWORD_BCRYPT );
26842686

@@ -2688,12 +2690,14 @@ function wp_hash_password(
26882690
* The default hashing algorithm is bcrypt, but this can be changed via the {@see 'wp_hash_password_algorithm'}
26892691
* filter. You must ensure that the options are appropriate for the algorithm in use.
26902692
*
2693+
* The values of the algorithm constants are strings in PHP 7.4+ and integers in PHP 7.3 and earlier.
2694+
*
26912695
* @since 6.8.0
26922696
*
2693-
* @param array $options Array of options to pass to the password hashing functions.
2694-
* By default this is an empty array which means the default
2695-
* options will be used.
2696-
* @param string $algorithm The hashing algorithm in use.
2697+
* @param array $options Array of options to pass to the password hashing functions.
2698+
* By default this is an empty array which means the default
2699+
* options will be used.
2700+
* @param string|int $algorithm The hashing algorithm in use.
26972701
*/
26982702
$options = apply_filters( 'wp_hash_password_options', array(), $algorithm );
26992703

0 commit comments

Comments
 (0)