mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Handle errors during next_result()
This commit is contained in:
parent
c1f8dd4a33
commit
eda7492604
3 changed files with 83 additions and 2 deletions
|
@ -1608,7 +1608,11 @@ PHP_FUNCTION(mysqli_next_result) {
|
|||
}
|
||||
MYSQLI_FETCH_RESOURCE_CONN(mysql, mysql_link, MYSQLI_STATUS_VALID);
|
||||
|
||||
RETURN_BOOL(!mysql_next_result(mysql->mysql));
|
||||
if (mysql_next_result(mysql->mysql)) {
|
||||
MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
@ -1640,7 +1644,11 @@ PHP_FUNCTION(mysqli_stmt_next_result) {
|
|||
}
|
||||
MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID);
|
||||
|
||||
RETURN_BOOL(!mysql_stmt_next_result(stmt->stmt));
|
||||
if (mysql_stmt_next_result(stmt->stmt)) {
|
||||
MYSQLI_REPORT_STMT_ERROR(stmt->stmt);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
RETURN_TRUE;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue