forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisplay_error_function_args.phpt
More file actions
30 lines (22 loc) · 971 Bytes
/
Copy pathdisplay_error_function_args.phpt
File metadata and controls
30 lines (22 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--TEST--
Displaying function arguments in errors
--INI--
error_include_args=On
--FILE--
<?php
// A function that sets its own parameters in docref call, to compare
unlink('/');
// Something with sensitive parameters that exists in a minimal build,
// and also doesn't set anything in the docref call. cost is set to 4
// to keep the test fast
$flags = ["salt" => "123456789012345678901" . chr(0), "cost" => 4];
password_hash("test", PASSWORD_BCRYPT, $flags);
ini_set("error_include_args", "Off");
unlink('/');
password_hash("test", PASSWORD_BCRYPT, $flags);
?>
--EXPECTF--
Warning: unlink('/'): %s in %s on line %d
Warning: password_hash(Object(SensitiveParameterValue), '2y', Array): The "salt" option has been ignored, since providing a custom salt is no longer supported in %s on line %d
Warning: unlink(/): %s in %s on line %d
Warning: password_hash(): The "salt" option has been ignored, since providing a custom salt is no longer supported in %s on line %d