cvs: php-src /ext/pgsql pgsql.c /ext/pgsql/tests .cvsignore 80_bug36625.phpt

From: Date: Mon, 06 Mar 2006 20:16:34 +0000
Subject: cvs: php-src /ext/pgsql pgsql.c /ext/pgsql/tests .cvsignore 80_bug36625.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-37155@lists.php.net to get a copy of this message
helly Mon Mar 6 20:16:34 2006 UTC Added files: /php-src/ext/pgsql/tests 80_bug36625.phpt Modified files: /php-src/ext/pgsql pgsql.c /php-src/ext/pgsql/tests .cvsignore Log: - Fixed #36625 pg_trace() does not work http://cvs.php.net/viewcvs.cgi/php-src/ext/pgsql/pgsql.c?r1=1.342&r2=1.343&diff_format=u Index: php-src/ext/pgsql/pgsql.c diff -u php-src/ext/pgsql/pgsql.c:1.342 php-src/ext/pgsql/pgsql.c:1.343 --- php-src/ext/pgsql/pgsql.c:1.342 Sun Mar 5 13:33:28 2006 +++ php-src/ext/pgsql/pgsql.c Mon Mar 6 20:16:34 2006 @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c,v 1.342 2006/03/05 13:33:28 tony2001 Exp $ */ +/* $Id: pgsql.c,v 1.343 2006/03/06 20:16:34 helly Exp $ */ #include <stdlib.h> @@ -2360,7 +2360,7 @@ 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; } http://cvs.php.net/viewcvs.cgi/php-src/ext/pgsql/tests/.cvsignore?r1=1.6&r2=1.7&diff_format=u Index: php-src/ext/pgsql/tests/.cvsignore diff -u php-src/ext/pgsql/tests/.cvsignore:1.6 php-src/ext/pgsql/tests/.cvsignore:1.7 --- php-src/ext/pgsql/tests/.cvsignore:1.6 Sun Oct 10 16:10:04 2004 +++ php-src/ext/pgsql/tests/.cvsignore Mon Mar 6 20:16:34 2006 @@ -6,3 +6,4 @@ *.php *.gcda *.gcno +trace.tmp http://cvs.php.net/viewcvs.cgi/php-src/ext/pgsql/tests/80_bug36625.phpt?view=markup&rev=1.1 Index: php-src/ext/pgsql/tests/80_bug36625.phpt +++ php-src/ext/pgsql/tests/80_bug36625.phpt --TEST-- Bug #36625 (pg_trace() does not work) --SKIPIF-- <?php require_once('skipif.inc'); ?> --FILE-- <?php require_once('config.inc'); $dbh = @pg_connect($conn_str); if (!$dbh) { die ('Could not connect to the server'); } $tracefile = dirname(__FILE__) . '/trace.tmp'; @unlink($tracefile); var_dump(file_exists($tracefile)); pg_trace($tracefile, 'w', $dbh); $res = pg_query($dbh, 'select 1'); var_dump($res); pg_close($dbh); $found = 0; function search_trace_file($line) { if (strpos($line, '"select 1"') !== false || strpos($line, "'select 1'") !== false) { $GLOBALS['found']++; } } $trace = file($tracefile); array_walk($trace, 'search_trace_file'); var_dump($found > 0); var_dump(file_exists($tracefile)); ?> ===DONE=== --CLEAN-- <?php unlink($tracefile); ?> --EXPECTF-- bool(false) resource(%d) of type (pgsql result) bool(true) bool(true) ===DONE===

« previous php.cvs (#37155) next »