]> granicus.if.org Git - php/commitdiff
Need to init connstring when there are 2 args.
authorYasuo Ohgaki <yohgaki@php.net>
Sun, 13 Oct 2002 09:41:35 +0000 (09:41 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Sun, 13 Oct 2002 09:41:35 +0000 (09:41 +0000)
ext/pgsql/pgsql.c

index b5a40ecbf85759ce86cadf522b0339550ad4cc3e..13a8e4988611752ae080335944c1036ce5127b7a 100644 (file)
@@ -511,6 +511,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
        if (ZEND_NUM_ARGS() == 1) { /* new style, using connection string */
                connstring = Z_STRVAL_PP(args[0]);
        } else if (ZEND_NUM_ARGS() == 2 ) { /* Safe to add conntype_option, since 2 args was illegal */
+               connstring = Z_STRVAL_PP(args[0]);
                convert_to_long_ex(args[1]);
                connect_type = Z_LVAL_PP(args[1]);
        } else {