From: Georg Richter Date: Thu, 2 Sep 2004 04:52:07 +0000 (+0000) Subject: fixed compiler warnings X-Git-Tag: php-5.0.2RC1~49 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c99f0230c7a61a2d2d4f46df7869bfeded82fa4;p=php fixed compiler warnings fixed bug #29283 --- 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();\ }\