mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
mysqli_result::__construct should throw exceptions (#7855)
This commit is contained in:
parent
f2b50156bc
commit
50c7512f52
1 changed files with 4 additions and 0 deletions
|
@ -980,8 +980,12 @@ PHP_METHOD(mysqli_result, __construct)
|
|||
}
|
||||
|
||||
if (!result) {
|
||||
MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
if (MyG(report_mode) & MYSQLI_REPORT_INDEX) {
|
||||
php_mysqli_report_index("from previous query", mysqli_server_status(mysql->mysql));
|
||||
}
|
||||
|
||||
mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE));
|
||||
mysqli_resource->ptr = (void *)result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue