From 3828ca158ebb08ad3cf2b57404161e364720210a Mon Sep 17 00:00:00 2001 From: Andrey Hristov Date: Fri, 25 Sep 2009 12:25:54 +0000 Subject: Fix mysqli_stmt_attr_set in libmysql mode. mysql_stmt_attr_set returns my_bool instead of int. If it was int, then 0 is success and !0 is failure, but for my_bool 0 (FALSE) is failure and !0 is success. --- ext/mysqli/mysqli_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/mysqli/mysqli_api.c') diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index ffed8ba32c..07bc303d72 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -2128,7 +2128,7 @@ PHP_FUNCTION(mysqli_stmt_attr_set) mode = mode_in; #if !defined(MYSQLI_USE_MYSQLND) - if (mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) { + if (FALSE == mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) { #else if (FAIL == mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) { #endif -- cgit v1.2.1