From 63e37dfd82427cf3a689c98f048492d33d6f234c Mon Sep 17 00:00:00 2001 From: ddv Date: Fri, 24 Nov 2023 14:39:07 +0500 Subject: [PATCH 1/3] Fix phpGH-12763: PGSQL pg_untrace(): Argument #1 ($connection) must be of type resource or null, PgSql\Connection given. --- ext/pgsql/pgsql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 66f09382fc32e..9f04f2c843b9c 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2286,7 +2286,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(); } From 43964f5abc4f8092c796b280d451a388c1e35a51 Mon Sep 17 00:00:00 2001 From: ddv Date: Mon, 27 Nov 2023 17:08:38 +0500 Subject: [PATCH 2/3] Fix phpGH-12763: PGSQL pg_untrace(): Argument #1 ($connection) must be of type resource or null, PgSql\Connection given. Add test bugGH12763.phpt --- ext/pgsql/tests/bugGH12763.phpt | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ext/pgsql/tests/bugGH12763.phpt diff --git a/ext/pgsql/tests/bugGH12763.phpt b/ext/pgsql/tests/bugGH12763.phpt new file mode 100644 index 0000000000000..3d637552b427d --- /dev/null +++ b/ext/pgsql/tests/bugGH12763.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 \ No newline at end of file From 73cd3aa3aec384c349b6ee7d1cfb6fa0fb318f4f Mon Sep 17 00:00:00 2001 From: ddv Date: Mon, 27 Nov 2023 17:35:31 +0500 Subject: [PATCH 3/3] Fix phpGH-12763: PGSQL pg_untrace(): Argument #1 ($connection) must be of type resource or null, PgSql\Connection given. Rename test to gh12763.phpt. Add new line. --- ext/pgsql/tests/{bugGH12763.phpt => gh12763.phpt} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename ext/pgsql/tests/{bugGH12763.phpt => gh12763.phpt} (99%) diff --git a/ext/pgsql/tests/bugGH12763.phpt b/ext/pgsql/tests/gh12763.phpt similarity index 99% rename from ext/pgsql/tests/bugGH12763.phpt rename to ext/pgsql/tests/gh12763.phpt index 3d637552b427d..a9bc0d18cfe56 100644 --- a/ext/pgsql/tests/bugGH12763.phpt +++ b/ext/pgsql/tests/gh12763.phpt @@ -20,4 +20,4 @@ echo isset($items[0]) ? 'OK' : 'FAIL'; ?> --EXPECT-- -OK \ No newline at end of file +OK