mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Make mysqli_ssl_set() arguments nullable
This function internally converts zero length arguments to NULL argument -- but we should also accept them in the first place. Null arguments being accepted was actually documented, before bug #78399 adjusted the docs to match current behavior.
This commit is contained in:
parent
fd5ff37db7
commit
39c6aaa9cc
3 changed files with 22 additions and 22 deletions
|
@ -256,11 +256,11 @@ class mysqli
|
||||||
* @alias mysqli_ssl_set
|
* @alias mysqli_ssl_set
|
||||||
*/
|
*/
|
||||||
public function ssl_set(
|
public function ssl_set(
|
||||||
string $key,
|
?string $key,
|
||||||
string $certificate,
|
?string $certificate,
|
||||||
string $ca_certificate,
|
?string $ca_certificate,
|
||||||
string $ca_path,
|
?string $ca_path,
|
||||||
string $cipher_algos
|
?string $cipher_algos
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -750,11 +750,11 @@ function mysqli_sqlstate(mysqli $mysql): string {}
|
||||||
|
|
||||||
function mysqli_ssl_set(
|
function mysqli_ssl_set(
|
||||||
mysqli $mysql,
|
mysqli $mysql,
|
||||||
string $key,
|
?string $key,
|
||||||
string $certificate,
|
?string $certificate,
|
||||||
string $ca_certificate,
|
?string $ca_certificate,
|
||||||
string $ca_path,
|
?string $ca_path,
|
||||||
string $cipher_algos
|
?string $cipher_algos
|
||||||
): bool {}
|
): bool {}
|
||||||
|
|
||||||
function mysqli_stat(mysqli $mysql): string|false {}
|
function mysqli_stat(mysqli $mysql): string|false {}
|
||||||
|
|
|
@ -2157,7 +2157,7 @@ PHP_FUNCTION(mysqli_ssl_set)
|
||||||
char *ssl_parm[5];
|
char *ssl_parm[5];
|
||||||
size_t ssl_parm_len[5], i;
|
size_t ssl_parm_len[5], i;
|
||||||
|
|
||||||
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Osssss", &mysql_link, mysqli_link_class_entry, &ssl_parm[0], &ssl_parm_len[0], &ssl_parm[1], &ssl_parm_len[1], &ssl_parm[2], &ssl_parm_len[2], &ssl_parm[3], &ssl_parm_len[3], &ssl_parm[4], &ssl_parm_len[4]) == FAILURE) {
|
if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Os!s!s!s!s!", &mysql_link, mysqli_link_class_entry, &ssl_parm[0], &ssl_parm_len[0], &ssl_parm[1], &ssl_parm_len[1], &ssl_parm[2], &ssl_parm_len[2], &ssl_parm[3], &ssl_parm_len[3], &ssl_parm[4], &ssl_parm_len[4]) == FAILURE) {
|
||||||
RETURN_THROWS();
|
RETURN_THROWS();
|
||||||
}
|
}
|
||||||
MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED);
|
MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* This is a generated file, edit the .stub.php file instead.
|
/* This is a generated file, edit the .stub.php file instead.
|
||||||
* Stub hash: 5a8b778eaa9efcca7d3ad8bfdbaa31d9d07b25e8 */
|
* Stub hash: 36c7ee22aa4c5bb5e0174031a3defcaaadde0dbd */
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_affected_rows, 0, 1, MAY_BE_LONG|MAY_BE_STRING)
|
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_affected_rows, 0, 1, MAY_BE_LONG|MAY_BE_STRING)
|
||||||
ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0)
|
ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0)
|
||||||
|
@ -386,11 +386,11 @@ ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_ssl_set, 0, 6, _IS_BOOL, 0)
|
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_ssl_set, 0, 6, _IS_BOOL, 0)
|
||||||
ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0)
|
ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0)
|
||||||
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
|
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 1)
|
||||||
ZEND_ARG_TYPE_INFO(0, certificate, IS_STRING, 0)
|
ZEND_ARG_TYPE_INFO(0, certificate, IS_STRING, 1)
|
||||||
ZEND_ARG_TYPE_INFO(0, ca_certificate, IS_STRING, 0)
|
ZEND_ARG_TYPE_INFO(0, ca_certificate, IS_STRING, 1)
|
||||||
ZEND_ARG_TYPE_INFO(0, ca_path, IS_STRING, 0)
|
ZEND_ARG_TYPE_INFO(0, ca_path, IS_STRING, 1)
|
||||||
ZEND_ARG_TYPE_INFO(0, cipher_algos, IS_STRING, 0)
|
ZEND_ARG_TYPE_INFO(0, cipher_algos, IS_STRING, 1)
|
||||||
ZEND_END_ARG_INFO()
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_stat, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
|
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_stat, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
|
||||||
|
@ -549,11 +549,11 @@ ZEND_END_ARG_INFO()
|
||||||
#define arginfo_class_mysqli_set_opt arginfo_class_mysqli_options
|
#define arginfo_class_mysqli_set_opt arginfo_class_mysqli_options
|
||||||
|
|
||||||
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_ssl_set, 0, 0, 5)
|
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_ssl_set, 0, 0, 5)
|
||||||
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
|
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 1)
|
||||||
ZEND_ARG_TYPE_INFO(0, certificate, IS_STRING, 0)
|
ZEND_ARG_TYPE_INFO(0, certificate, IS_STRING, 1)
|
||||||
ZEND_ARG_TYPE_INFO(0, ca_certificate, IS_STRING, 0)
|
ZEND_ARG_TYPE_INFO(0, ca_certificate, IS_STRING, 1)
|
||||||
ZEND_ARG_TYPE_INFO(0, ca_path, IS_STRING, 0)
|
ZEND_ARG_TYPE_INFO(0, ca_path, IS_STRING, 1)
|
||||||
ZEND_ARG_TYPE_INFO(0, cipher_algos, IS_STRING, 0)
|
ZEND_ARG_TYPE_INFO(0, cipher_algos, IS_STRING, 1)
|
||||||
ZEND_END_ARG_INFO()
|
ZEND_END_ARG_INFO()
|
||||||
|
|
||||||
#define arginfo_class_mysqli_stat arginfo_class_mysqli_character_set_name
|
#define arginfo_class_mysqli_stat arginfo_class_mysqli_character_set_name
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue