1--TEST-- 2Bug #GH12763 (pg_untrace(): Argument #1 ($connection) must be of type resource or null, PgSql\Connection given) 3--EXTENSIONS-- 4pgsql 5--SKIPIF-- 6<?php include("inc/skipif.inc"); ?> 7--FILE-- 8<?php 9include('inc/config.inc'); 10 11$conn = pg_connect($conn_str); 12 13$file_name = tempnam('.', 'trace.log'); 14pg_trace($file_name, 'w', $conn); 15pg_query($conn, 'select 1 as a'); 16pg_untrace($conn); 17$items = explode("\n", file_get_contents($file_name)); 18unlink($file_name); 19echo isset($items[0]) ? 'OK' : 'FAIL'; 20 21?> 22--EXPECT-- 23OK 24