Merge branch 'PHP-8.1' into PHP-8.2

This commit is contained in:
David Carlier 2023-06-18 13:45:30 +01:00
commit bc45b34b30
3 changed files with 24 additions and 0 deletions

3
NEWS
View file

@ -54,6 +54,9 @@ PHP NEWS
- PCRE:
. Fix preg_replace_callback_array() pattern validation. (ilutov)
- PGSQL:
. Fixed intermittent segfault with pg_trace. (David Carlier)
- Phar:
. Fix cross-compilation check in phar generation for FreeBSD. (peter279k)

View file

@ -175,6 +175,7 @@ static void pgsql_link_free(pgsql_link_handle *link)
PQclear(res);
}
if (!link->persistent) {
PQuntrace(link->conn);
PQfinish(link->conn);
}
PGG(num_links)--;

View file

@ -0,0 +1,20 @@
--TEST--
pg_trace
--EXTENSIONS--
pgsql
--SKIPIF--
<?php include("skipif.inc"); ?>
--FILE--
<?php
include('config.inc');
$db = pg_connect($conn_str);
$tracefile = __DIR__ . '/trace.tmp';
var_dump(pg_trace($tracefile, 'w', $db));
$res = pg_query($db, 'select 1');
?>
--EXPECTF--
bool(true)