diff options
Diffstat (limited to 'ext/mysqli/php_mysqli_structs.h')
-rw-r--r-- | ext/mysqli/php_mysqli_structs.h | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h index a1751f97b2..1b016aab42 100644 --- a/ext/mysqli/php_mysqli_structs.h +++ b/ext/mysqli/php_mysqli_structs.h @@ -273,21 +273,13 @@ extern void php_mysqli_fetch_into_hash_aux(zval *return_value, MYSQL_RES * resul #define MYSQLI_FETCH_RESOURCE_CONN(__ptr, __id, __check) \ { \ MYSQLI_FETCH_RESOURCE((__ptr), MY_MYSQL *, (__id), "mysqli_link", (__check)); \ - if (!(__ptr)->mysql) { \ - mysqli_object *intern = Z_MYSQLI_P(__id); \ - php_error_docref(NULL, E_WARNING, "invalid object or resource %s\n", ZSTR_VAL(intern->zo.ce->name)); \ - RETURN_NULL(); \ - } \ + ZEND_ASSERT((__ptr)->mysql && "Missing connection?"); \ } #define MYSQLI_FETCH_RESOURCE_STMT(__ptr, __id, __check) \ { \ MYSQLI_FETCH_RESOURCE((__ptr), MY_STMT *, (__id), "mysqli_stmt", (__check)); \ - if (!(__ptr)->stmt) { \ - mysqli_object *intern = Z_MYSQLI_P(__id); \ - php_error_docref(NULL, E_WARNING, "invalid object or resource %s\n", ZSTR_VAL(intern->zo.ce->name)); \ - RETURN_NULL();\ - } \ + ZEND_ASSERT((__ptr)->stmt && "Missing statement?"); \ } #define MYSQLI_SET_STATUS(__id, __value) \ |