diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 88cf0c431ee..aac2afd4936 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -3359,8 +3359,7 @@ PHP_FUNCTION(pg_unescape_bytea) char *from, *tmp; size_t to_len; size_t from_len; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!", - &from, &from_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &from, &from_len) == FAILURE) { RETURN_THROWS(); } diff --git a/ext/pgsql/pgsql.stub.php b/ext/pgsql/pgsql.stub.php index 66044b95a5b..759313d8ba6 100644 --- a/ext/pgsql/pgsql.stub.php +++ b/ext/pgsql/pgsql.stub.php @@ -425,7 +425,7 @@ function pg_escape_string($connection, string $string = UNKNOWN): string {} /** @param resource|string $connection */ function pg_escape_bytea($connection, string $string = UNKNOWN): string {} -function pg_unescape_bytea(?string $string = null): string {} +function pg_unescape_bytea(string $string): string {} /** @param resource|string $connection */ function pg_escape_literal($connection, string $string = UNKNOWN): string|false {} diff --git a/ext/pgsql/pgsql_arginfo.h b/ext/pgsql/pgsql_arginfo.h index be9edb2c57a..6db1b8a1c3f 100644 --- a/ext/pgsql/pgsql_arginfo.h +++ b/ext/pgsql/pgsql_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: 3479aee134cb8d952c846d120f51a8cf75e55e86 */ + * Stub hash: deb01afb2b4e645c00684fae61a6042ebfbaaaa1 */ ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_connect, 0, 0, 1) ZEND_ARG_TYPE_INFO(0, connection_string, IS_STRING, 0) @@ -327,8 +327,8 @@ ZEND_END_ARG_INFO() #define arginfo_pg_escape_bytea arginfo_pg_escape_string -ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_unescape_bytea, 0, 0, IS_STRING, 0) - ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, string, IS_STRING, 1, "null") +ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_pg_unescape_bytea, 0, 1, IS_STRING, 0) + ZEND_ARG_TYPE_INFO(0, string, IS_STRING, 0) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_pg_escape_literal, 0, 1, MAY_BE_STRING|MAY_BE_FALSE)