From 038ba12e8724d537040e88ec794354b0c063f0a6 Mon Sep 17 00:00:00 2001 From: Ondřej Surý Date: Fri, 18 Mar 2011 11:28:21 +0100 Subject: Imported Upstream version 5.3.6 --- ext/pdo_pgsql/pgsql_statement.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/pdo_pgsql/pgsql_statement.c') diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index 8f2c8f85c..e70387413 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2010 The PHP Group | + | Copyright (c) 1997-2011 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql_statement.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: pgsql_statement.c 306939 2011-01-01 02:19:59Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -184,7 +184,7 @@ stmt_retry: * chance to DEALLOCATE the prepared statements it has created. so, if we hit a 42P05 we * deallocate it and retry ONCE (thies 2005.12.15) */ - if (!strcmp(sqlstate, "42P05")) { + if (sqlstate && !strcmp(sqlstate, "42P05")) { char buf[100]; /* stmt_name == "pdo_crsr_%08x" */ PGresult *res; snprintf(buf, sizeof(buf), "DEALLOCATE %s", S->stmt_name); -- cgit v1.2.3