php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

Patch pg_field_type for PostgreSQL related Bug #70092

Patch version 2015-07-25 14:04 UTC

Return to Bug #70092 | Download this patch
Patch Revisions:

Developer: cmb@php.net

 ext/pgsql/pgsql.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 1172682..888ae76 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -2368,7 +2368,7 @@ static char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list)
 				continue;
 			}
 
-			ZSTR_LEN(str.s) = 0;
+			smart_str_free(&str);
 			smart_str_appends(&str, "pgsql_oid_");
 			smart_str_appends(&str, tmp_oid);
 			smart_str_0(&str);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 15:01:31 2024 UTC