]> granicus.if.org Git - php/commitdiff
Fixed crash.
authorYasuo Ohgaki <yohgaki@php.net>
Sat, 20 Jul 2002 06:45:35 +0000 (06:45 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Sat, 20 Jul 2002 06:45:35 +0000 (06:45 +0000)
ext/pgsql/pgsql.c

index 7121dbf75c428cc70c6dccaa105ee7e662071c9a..21bb285e3784ee2b7e5226fafe9f742b62a651f0 100644 (file)
@@ -3079,7 +3079,7 @@ static int php_pgsql_add_quotes(zval *src, zend_bool should_free TSRMLS_DC)
 /* }}} */
 
 #define PGSQL_CONV_CHECK_IGNORE() \
-                               if (!err && !strcmp(Z_STRVAL_P(new_val), "NULL")) { \
+                               if (!err && Z_TYPE_P(new_val) == IS_STRING && !strcmp(Z_STRVAL_P(new_val), "NULL")) { \
                                        /* if value is NULL and has default, remove entry to use default value*/ \
                                        if (!(opt & PGSQL_CONV_IGNORE_DEFAULT) && Z_BVAL_PP(has_default)) { \
                                                zval_dtor(new_val); \