summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Richter <georg@php.net>2004-09-02 04:52:07 +0000
committerGeorg Richter <georg@php.net>2004-09-02 04:52:07 +0000
commit2c99f0230c7a61a2d2d4f46df7869bfeded82fa4 (patch)
tree16089393be21a10b76ef878d941e6464436fab08
parentea138b85abda4b0ffe810f8fba8bfa573480bf88 (diff)
downloadphp-git-2c99f0230c7a61a2d2d4f46df7869bfeded82fa4.tar.gz
fixed compiler warnings
fixed bug #29283
-rw-r--r--NEWS1
-rw-r--r--ext/mysqli/mysqli_api.c4
-rw-r--r--ext/mysqli/php_mysqli.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/NEWS b/NEWS
index 04725bdfc6..4c1c28dc55 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,7 @@ PHP NEWS
(Christian, Rob)
- Fixed bug #29656 (segfault on result and statement properties). (Georg)
- Fixed bug #29447 (Reflection API issues). (Marcus)
+- Fixed bug #29283 (Invalid statement handle in mysqli on execute). (Georg)
- Fixed bug #27994 (segfault with Soapserver when WSDL-Cache is enabled).
(Dmitry)
- Fixed bug #27791 (Apache 2.0 SAPI build against Apache 2 HEAD). (Joe Orton,
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index 773f2758d7..ce2ef2e4c0 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -1726,7 +1726,7 @@ PHP_FUNCTION(mysqli_stmt_attr_set)
}
MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt");
- if (rc = mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) {
+ if ((rc = mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode))) {
RETURN_FALSE;
}
RETURN_TRUE;
@@ -1748,7 +1748,7 @@ PHP_FUNCTION(mysqli_stmt_attr_get)
}
MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt");
- if (rc = mysql_stmt_attr_get(stmt->stmt, attr, &value)) {
+ if ((rc = mysql_stmt_attr_get(stmt->stmt, attr, &value))) {
RETURN_FALSE;
}
RETURN_LONG(value);
diff --git a/ext/mysqli/php_mysqli.h b/ext/mysqli/php_mysqli.h
index c5a090fa2e..f42e6f48f9 100644
--- a/ext/mysqli/php_mysqli.h
+++ b/ext/mysqli/php_mysqli.h
@@ -180,7 +180,7 @@ PHP_MYSQLI_EXPORT(zend_object_value) mysqli_objects_new(zend_class_entry * TSRML
} \
__ptr = (__type)my_res->ptr; \
if (!strcmp((char *)__name, "mysqli_stmt")) {\
- if (!((MYSQL_STMT *)__ptr)->mysql) {\
+ if (! ((MY_STMT *)__ptr)->stmt->mysql) {\
php_error(E_WARNING, "Statement isn't valid anymore");\
RETURN_NULL();\
}\