Skip to content

Commit 765c646

Browse files
authored
Merge pull request #36 from phansys/sensitive_params
Use `\SensitiveParameter` attribute for `$password` parameter in `db2_connect()` and `db2_pconnect()` functions
2 parents a5cd853 + 2a485bf commit 765c646

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

ibm_db2.stub.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* @param resource $connection
1212
* @return resource|false
1313
*/
14-
function db2_connect(string $database, ?string $username, ?string $password, array $options = []) {}
14+
function db2_connect(string $database, ?string $username, #[\SensitiveParameter] ?string $password, array $options = []) {}
1515

1616
/**
1717
* @param resource $connection
@@ -22,7 +22,7 @@ function db2_commit($connection): bool {}
2222
* @param resource $connection
2323
* @return resource|false
2424
*/
25-
function db2_pconnect(string $database, ?string $username, ?string $password, array $options = []) {}
25+
function db2_pconnect(string $database, ?string $username, #[\SensitiveParameter] ?string $password, array $options = []) {}
2626

2727
/**
2828
* @param resource $connection

ibm_db2_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 507c5d7f43cee1a56677159e4dc1a388dc7e139d */
2+
* Stub hash: f4efdc4aa065c8af4c96b20b6f555f3abfdeb08e */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_db2_connect, 0, 0, 3)
55
ZEND_ARG_TYPE_INFO(0, database, IS_STRING, 0)

ibm_db2_legacy_arginfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* This is a generated file, edit the .stub.php file instead.
2-
* Stub hash: 507c5d7f43cee1a56677159e4dc1a388dc7e139d */
2+
* Stub hash: f4efdc4aa065c8af4c96b20b6f555f3abfdeb08e */
33

44
ZEND_BEGIN_ARG_INFO_EX(arginfo_db2_connect, 0, 0, 3)
55
ZEND_ARG_INFO(0, database)

0 commit comments

Comments
 (0)