From 7b0f5f424d7a96f2d7f021660a5280a6565a049d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 13 Oct 2020 15:36:09 +0200 Subject: Don't accept null in pg_unescape_bytea() This is an error that slipped in via 8d37c37bcdbf6fa99cd275413342457eeb2c664e. pg_unescape_bytea() did not accept null in PHP 7.4, and it is not meaningful for it to accept null now -- it will always fail, and now with a misleading OOM message. --- ext/pgsql/pgsql.stub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/pgsql/pgsql.stub.php') diff --git a/ext/pgsql/pgsql.stub.php b/ext/pgsql/pgsql.stub.php index 66044b95a5..759313d8ba 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 {} -- cgit v1.2.1