]> granicus.if.org Git - php/commitdiff
fixed compiler warnings
authorGeorg Richter <georg@php.net>
Thu, 2 Sep 2004 04:52:07 +0000 (04:52 +0000)
committerGeorg Richter <georg@php.net>
Thu, 2 Sep 2004 04:52:07 +0000 (04:52 +0000)
fixed bug #29283

NEWS
ext/mysqli/mysqli_api.c
ext/mysqli/php_mysqli.h

diff --git a/NEWS b/NEWS
index 04725bdfc6fcbf41814061303015064f679fc93d..4c1c28dc555272829abb0b3bd19421961e5270bf 100644 (file)
--- 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,
index 773f2758d742d8926441f25848463d7766e55cba..ce2ef2e4c08ae418c0d1f01b61e6ac36458fd5a5 100644 (file)
@@ -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);
index c5a090fa2e29a7fe744ba1c1a512c1ba02ee6438..f42e6f48f958a16af0f96f4e2e1a6380b8e4cc67 100644 (file)
@@ -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();\
                }\