Merge branch 'PHP-8.3'

This commit is contained in:
David Carlier 2023-11-27 18:20:38 +00:00
commit 2ef4785dac
2 changed files with 24 additions and 1 deletions

View File

@ -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();
}

View File

@ -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--
<?php include("skipif.inc"); ?>
--FILE--
<?php
include('config.inc');
$conn = pg_connect($conn_str);
$file_name = tempnam('.', 'trace.log');
pg_trace($file_name, 'w', $conn);
pg_query($conn, 'select 1 as a');
pg_untrace($conn);
$items = explode("\n", file_get_contents($file_name));
unlink($file_name);
echo isset($items[0]) ? 'OK' : 'FAIL';
?>
--EXPECT--
OK