From: Andrey Hristov Date: Fri, 25 Sep 2009 10:52:29 +0000 (+0000) Subject: Fix error code checking for mysql_stmt_attr_set. There X-Git-Tag: php-5.3.2RC1~440 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eea0660defae3a39c500e73644a33d107a502f91;p=php Fix error code checking for mysql_stmt_attr_set. There is a test that checks this. --- diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 2c32d5cd4c..ade5f126ca 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -2128,7 +2128,11 @@ PHP_FUNCTION(mysqli_stmt_attr_set) } mode = mode_in; - if ((rc = mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode))) { +#if !defined(MYSQLI_USE_MYSQLND) + if (mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) { +#else + if (FAIL == mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) { +#endif RETURN_FALSE; } RETURN_TRUE;