From 81954dcf78dca4a4a5c7e047ccd35f2767a3c50f Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Mon, 6 Mar 2006 20:16:34 +0000 Subject: [PATCH] - Fixed #36625 pg_trace() does not work --- ext/pgsql/pgsql.c | 2 +- ext/pgsql/tests/80_bug36625.phpt | 49 ++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100755 ext/pgsql/tests/80_bug36625.phpt diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 2f179b426e..d52d2b4519 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2360,7 +2360,7 @@ PHP_FUNCTION(pg_trace) RETURN_FALSE; } - if (FAILURE == php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void**)fp, REPORT_ERRORS)) { + if (FAILURE == php_stream_cast(stream, PHP_STREAM_AS_STDIO, (void**)&fp, REPORT_ERRORS)) { php_stream_close(stream); RETURN_FALSE; } diff --git a/ext/pgsql/tests/80_bug36625.phpt b/ext/pgsql/tests/80_bug36625.phpt new file mode 100755 index 0000000000..a95cea7110 --- /dev/null +++ b/ext/pgsql/tests/80_bug36625.phpt @@ -0,0 +1,49 @@ +--TEST-- +Bug #36625 (pg_trace() does not work) +--SKIPIF-- + +--FILE-- + 0); +var_dump(file_exists($tracefile)); + +?> +===DONE=== +--CLEAN-- + +--EXPECTF-- +bool(false) +resource(%d) of type (pgsql result) +bool(true) +bool(true) +===DONE=== -- 2.50.1