]> granicus.if.org Git - php/commitdiff
Copy empty_string, fixed crash.
authorYasuo Ohgaki <yohgaki@php.net>
Mon, 22 Jul 2002 06:38:36 +0000 (06:38 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Mon, 22 Jul 2002 06:38:36 +0000 (06:38 +0000)
# I thought efree() won't free empty_string...

ext/pgsql/pgsql.c

index 1c3970128231b32010263e78bc28de2413ed672d..018bedc0f7a6a2e5a36343eed48ca9264a44bd62 100644 (file)
@@ -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;