MYSQLI_RESOURCE *my_res; \
mysqli_object *intern = (mysqli_object *)zend_object_store_get_object(*(__id) TSRMLS_CC);\
if (!(my_res = (MYSQLI_RESOURCE *)intern->ptr)) {\
- php_error(E_WARNING, "Couldn't fetch %s", intern->zo.ce->name);\
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't fetch %s", intern->zo.ce->name);\
RETURN_NULL();\
}\
if (!intern->valid) { \
- php_error(E_WARNING, "invalid resource %s", intern->zo.ce->name); \
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid resource %s", intern->zo.ce->name); \
RETURN_NULL(); \
} \
__ptr = (__type)my_res->ptr; \
if (!strcmp((char *)__name, "mysqli_stmt")) {\
if (!((MY_STMT *)__ptr)->stmt->mysql) {\
- php_error(E_WARNING, "Statement isn't valid anymore");\
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Statement isn't valid anymore");\
RETURN_NULL();\
}\
}\