summaryrefslogtreecommitdiff
path: root/ext/mysqli/mysqli_api.c
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2009-09-25 10:52:29 +0000
committerAndrey Hristov <andrey@php.net>2009-09-25 10:52:29 +0000
commiteea0660defae3a39c500e73644a33d107a502f91 (patch)
treed7e0f87c51a17012a6931e1489ed7a9d795c3a2a /ext/mysqli/mysqli_api.c
parent80f629ed9f9e4840c85bb025ec5049737ca6e854 (diff)
downloadphp-git-eea0660defae3a39c500e73644a33d107a502f91.tar.gz
Fix error code checking for mysql_stmt_attr_set. There
is a test that checks this.
Diffstat (limited to 'ext/mysqli/mysqli_api.c')
-rw-r--r--ext/mysqli/mysqli_api.c6
1 files changed, 5 insertions, 1 deletions
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;