From: Frank M. Kromann Date: Thu, 27 Jan 2005 20:21:32 +0000 (+0000) Subject: MFH: Hack to fix crash caused by FBCAccess not returning errors when creating an... X-Git-Tag: php-5.0.4RC1~233 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4acc981ac4fccdd859882f33ddbc51d29a2ff28e;p=php MFH: Hack to fix crash caused by FBCAccess not returning errors when creating an index that exists in the database. --- diff --git a/ext/fbsql/php_fbsql.c b/ext/fbsql/php_fbsql.c index 5a25884233..8f9db88802 100644 --- a/ext/fbsql/php_fbsql.c +++ b/ext/fbsql/php_fbsql.c @@ -1895,9 +1895,12 @@ static void phpfbQuery(INTERNAL_FUNCTION_PARAMETERS, char* sql, PHPFBLink* link) md = meta; tp = fbcmdStatementType(md); - - if ((tp[0] == 'C') || (tp[0] == 'R')) - { + if (tp == NULL) { + fbcmdRelease(meta); + ZVAL_BOOL(return_value, 0) + } + else if ((tp[0] == 'C') || (tp[0] == 'R')) + { if (sR == 1 && md) fbcmdRelease(md); ZVAL_BOOL(return_value, 1) }