]> granicus.if.org Git - php/commitdiff
ibase_query(): Be careful not to return true on error conditions
authorArd Biesheuvel <abies@php.net>
Tue, 4 May 2004 12:42:54 +0000 (12:42 +0000)
committerArd Biesheuvel <abies@php.net>
Tue, 4 May 2004 12:42:54 +0000 (12:42 +0000)
ext/interbase/ibase_query.c

index a29a64c32844a37773ecf2fc2cdd68c978b4e26b..e8436c03a4f0dbab3614237f05dbc44aea30316e 100644 (file)
@@ -941,7 +941,7 @@ static int _php_ibase_exec(INTERNAL_FUNCTION_PARAMETERS, ibase_result **ib_resul
                        return SUCCESS;
 
                default:
-                       RETVAL_TRUE;
+                       RETVAL_FALSE;
        }
 
        /* allocate sqlda and output buffers */
@@ -1027,7 +1027,11 @@ static int _php_ibase_exec(INTERNAL_FUNCTION_PARAMETERS, ibase_result **ib_resul
                        if (affected_rows > 0) {
                                ib_query->trans->affected_rows = affected_rows;
                                RETVAL_LONG(affected_rows);
+                               break;
                        }
+                       
+               default:
+                       RETVAL_TRUE;
        }
 
        rv = SUCCESS;