diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 7e94e2045b5..dd6bcf4e130 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2199,7 +2199,7 @@ PHP_FUNCTION(pg_untrace) PGconn *pgsql; pgsql_link_handle *link; - if (zend_parse_parameters(ZEND_NUM_ARGS(), "|r!", &pgsql_link) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|O!", &pgsql_link, pgsql_link_ce) == FAILURE) { RETURN_THROWS(); } diff --git a/ext/pgsql/tests/gh12763.phpt b/ext/pgsql/tests/gh12763.phpt new file mode 100644 index 00000000000..a9bc0d18cfe --- /dev/null +++ b/ext/pgsql/tests/gh12763.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #GH12763 (pg_untrace(): Argument #1 ($connection) must be of type resource or null, PgSql\Connection given) +--EXTENSIONS-- +pgsql +--SKIPIF-- + +--FILE-- + +--EXPECT-- +OK