From f0149c5c0b2b0af25d03c7b02e3f6eed3354376f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Tue, 25 Apr 2023 23:20:39 +0200 Subject: [PATCH] Fix ZPP of pg_lo_export() Closes GH-11132 --- NEWS | 3 +++ ext/pgsql/pgsql.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d6da8fdab79..4318d871d9d 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ PHP NEWS - Opcache: . Fixed bug GH-11134 (Incorrect match default branch optimization). (ilutov) +- PGSQL: + . Fixed parameter parsing of pg_lo_export(). (kocsismate) + 11 May 2023, PHP 8.1.19 - Core: diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 13120e2b588..cbed6b7db18 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2760,7 +2760,7 @@ PHP_FUNCTION(pg_lo_export) /* allow string to handle large OID value correctly */ if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(), - "rlP", &pgsql_link, pgsql_link_ce, &oid_long, &file_out) == SUCCESS) { + "OlP", &pgsql_link, pgsql_link_ce, &oid_long, &file_out) == SUCCESS) { if (oid_long <= (zend_long)InvalidOid) { zend_value_error("Invalid OID value passed"); RETURN_THROWS();