1
0
mirror of https://github.com/php/php-src.git synced 2026-04-02 05:32:28 +02:00

fixed compiler warnings

fixed bug #29283
This commit is contained in:
Georg Richter
2004-09-02 04:52:07 +00:00
parent ea138b85ab
commit 2c99f0230c
3 changed files with 4 additions and 3 deletions

1
NEWS
View File

@@ -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,

View 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);

View 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();\
}\