Skip to content

Commit d6a6a60

Browse files
committed
Merge branch 'PHP-7.4'
2 parents 16f194c + ea1b878 commit d6a6a60

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

ext/standard/password.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ const php_password_algo php_password_algo_argon2id = {
424424
PHP_MINIT_FUNCTION(password) /* {{{ */
425425
{
426426
zend_hash_init(&php_password_algos, 4, NULL, ZVAL_PTR_DTOR, 1);
427-
REGISTER_NULL_CONSTANT("PASSWORD_DEFAULT", CONST_CS | CONST_PERSISTENT);
427+
REGISTER_STRING_CONSTANT("PASSWORD_DEFAULT", "2y", CONST_CS | CONST_PERSISTENT);
428428

429429
if (FAILURE == php_password_algo_register("2y", &php_password_algo_bcrypt)) {
430430
return FAILURE;
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
--TEST--
2+
Test that the value of PASSWORD_DEFAULT matches PASSWORD_BCRYPT
3+
--FILE--
4+
<?php
5+
echo PASSWORD_DEFAULT . "\n";
6+
echo PASSWORD_BCRYPT . "\n";
7+
--EXPECT--
8+
2y
9+
2y

0 commit comments

Comments
 (0)