From: Yasuo Ohgaki Date: Mon, 22 Jul 2002 06:38:36 +0000 (+0000) Subject: Copy empty_string, fixed crash. X-Git-Tag: dev~205 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=882f83cf819dbcdb1a96910b3238cee1933052f7;p=php Copy empty_string, fixed crash. # I thought efree() won't free empty_string... --- diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 1c39701282..018bedc0f7 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -3347,7 +3347,7 @@ PHPAPI int php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval switch (Z_TYPE_PP(val)) { case IS_STRING: if (Z_STRLEN_PP(val) == 0) { - ZVAL_STRING(new_val, empty_string, 0); + ZVAL_STRING(new_val, empty_string, 1); } else { Z_TYPE_P(new_val) = IS_STRING;