File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -614,7 +614,7 @@ PHP_FUNCTION(password_needs_rehash)
614
614
Z_PARAM_STR (hash )
615
615
Z_PARAM_ZVAL (znew_algo )
616
616
Z_PARAM_OPTIONAL
617
- Z_PARAM_ARRAY_OR_OBJECT_HT (options )
617
+ Z_PARAM_ARRAY_HT (options )
618
618
ZEND_PARSE_PARAMETERS_END ();
619
619
620
620
new_algo = php_password_algo_find_zval (znew_algo );
@@ -663,7 +663,7 @@ PHP_FUNCTION(password_hash)
663
663
Z_PARAM_STR (password )
664
664
Z_PARAM_ZVAL (zalgo )
665
665
Z_PARAM_OPTIONAL
666
- Z_PARAM_ARRAY_OR_OBJECT_HT (options )
666
+ Z_PARAM_ARRAY_HT (options )
667
667
ZEND_PARSE_PARAMETERS_END ();
668
668
669
669
algo = php_password_algo_find_zval (zalgo );
Original file line number Diff line number Diff line change 12
12
13
13
var_dump (password_hash ("foo " , array ()));
14
14
15
- var_dump (password_hash ("foo " , 19 , new StdClass ));
15
+ try {
16
+ var_dump (password_hash ("foo " , 19 , new StdClass ));
17
+ } catch (TypeError $ e ) {
18
+ echo $ e ->getMessage (), "\n" ;
19
+ }
16
20
17
21
try {
18
22
var_dump (password_hash ("foo " , PASSWORD_BCRYPT , "baz " ));
@@ -34,8 +38,6 @@ Warning: Array to string conversion in %s on line %d
34
38
35
39
Warning: password_hash(): Unknown password hashing algorithm: Array in %s on line %d
36
40
NULL
37
-
38
- Warning: password_hash(): Unknown password hashing algorithm: 19 in %s on line %d
39
- NULL
41
+ password_hash() expects parameter 3 to be array, object given
40
42
password_hash() expects parameter 3 to be array, string given
41
43
password_hash() expects parameter 1 to be string, array given
You can’t perform that action at this time.
0 commit comments