Skip to content

Commit 1cd33d8

Browse files
committed
Merge branch 'PHP-8.0'
* PHP-8.0: Make mysqli_ssl_set() arguments nullable
2 parents 6aea64c + 39c6aaa commit 1cd33d8

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

ext/mysqli/mysqli.stub.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,11 @@ public function set_opt(int $option, $value) {}
256256
* @alias mysqli_ssl_set
257257
*/
258258
public function ssl_set(
259-
string $key,
260-
string $certificate,
261-
string $ca_certificate,
262-
string $ca_path,
263-
string $cipher_algos
259+
?string $key,
260+
?string $certificate,
261+
?string $ca_certificate,
262+
?string $ca_path,
263+
?string $cipher_algos
264264
) {}
265265

266266
/**
@@ -746,11 +746,11 @@ function mysqli_sqlstate(mysqli $mysql): string {}
746746

747747
function mysqli_ssl_set(
748748
mysqli $mysql,
749-
string $key,
750-
string $certificate,
751-
string $ca_certificate,
752-
string $ca_path,
753-
string $cipher_algos
749+
?string $key,
750+
?string $certificate,
751+
?string $ca_certificate,
752+
?string $ca_path,
753+
?string $cipher_algos
754754
): bool {}
755755

756756
function mysqli_stat(mysqli $mysql): string|false {}

ext/mysqli/mysqli_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2155,7 +2155,7 @@ PHP_FUNCTION(mysqli_ssl_set)
21552155
char *ssl_parm[5];
21562156
size_t ssl_parm_len[5], i;
21572157

2158-
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) {
2158+
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) {
21592159
RETURN_THROWS();
21602160
}
21612161
MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_INITIALIZED);

ext/mysqli/mysqli_arginfo.h

Lines changed: 11 additions & 11 deletions
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: a41875cecd71e72e1c1d3fc9c4d1442a65cd2d15 */
2+
* Stub hash: cd44441ccae3d04e4691e0b1b040cafd8db8b521 */
33

44
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_affected_rows, 0, 1, MAY_BE_LONG|MAY_BE_STRING)
55
ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0)
@@ -382,11 +382,11 @@ ZEND_END_ARG_INFO()
382382

383383
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_mysqli_ssl_set, 0, 6, _IS_BOOL, 0)
384384
ZEND_ARG_OBJ_INFO(0, mysql, mysqli, 0)
385-
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
386-
ZEND_ARG_TYPE_INFO(0, certificate, IS_STRING, 0)
387-
ZEND_ARG_TYPE_INFO(0, ca_certificate, IS_STRING, 0)
388-
ZEND_ARG_TYPE_INFO(0, ca_path, IS_STRING, 0)
389-
ZEND_ARG_TYPE_INFO(0, cipher_algos, IS_STRING, 0)
385+
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 1)
386+
ZEND_ARG_TYPE_INFO(0, certificate, IS_STRING, 1)
387+
ZEND_ARG_TYPE_INFO(0, ca_certificate, IS_STRING, 1)
388+
ZEND_ARG_TYPE_INFO(0, ca_path, IS_STRING, 1)
389+
ZEND_ARG_TYPE_INFO(0, cipher_algos, IS_STRING, 1)
390390
ZEND_END_ARG_INFO()
391391

392392
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_mysqli_stat, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)
@@ -545,11 +545,11 @@ ZEND_END_ARG_INFO()
545545
#define arginfo_class_mysqli_set_opt arginfo_class_mysqli_options
546546

547547
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_ssl_set, 0, 0, 5)
548-
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 0)
549-
ZEND_ARG_TYPE_INFO(0, certificate, IS_STRING, 0)
550-
ZEND_ARG_TYPE_INFO(0, ca_certificate, IS_STRING, 0)
551-
ZEND_ARG_TYPE_INFO(0, ca_path, IS_STRING, 0)
552-
ZEND_ARG_TYPE_INFO(0, cipher_algos, IS_STRING, 0)
548+
ZEND_ARG_TYPE_INFO(0, key, IS_STRING, 1)
549+
ZEND_ARG_TYPE_INFO(0, certificate, IS_STRING, 1)
550+
ZEND_ARG_TYPE_INFO(0, ca_certificate, IS_STRING, 1)
551+
ZEND_ARG_TYPE_INFO(0, ca_path, IS_STRING, 1)
552+
ZEND_ARG_TYPE_INFO(0, cipher_algos, IS_STRING, 1)
553553
ZEND_END_ARG_INFO()
554554

555555
#define arginfo_class_mysqli_stat arginfo_class_mysqli_character_set_name

0 commit comments

Comments
 (0)