#define METHOD_NOTSTATIC(ce) \
if (!this_ptr || !instanceof_function(Z_OBJCE_P(this_ptr), ce TSRMLS_CC)) { \
- zend_error(E_ERROR, "%s() cannot be called statically", get_active_function_name(TSRMLS_C)); \
+ php_error_docref(NULL TSRMLS_CC, E_ERROR, "%s() cannot be called statically", get_active_function_name(TSRMLS_C)); \
return; \
} \
intern = (reflection_object *) zend_object_store_get_object(getThis() TSRMLS_CC); \
if (intern == NULL || intern->ptr == NULL) { \
RETURN_ON_EXCEPTION \
- zend_error(E_ERROR, "Internal error: Failed to retrieve the reflection object"); \
+ php_error_docref(NULL TSRMLS_CC, E_ERROR, "Internal error: Failed to retrieve the reflection object"); \
} \
target = intern->ptr; \
/* Is there a better way of doing this? */
while (func->fname) {
if (zend_hash_find(EG(function_table), func->fname, strlen(func->fname) + 1, (void**) &fptr) == FAILURE) {
- zend_error(E_WARNING, "Internal error: Cannot find extension function %s in global function table", func->fname);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Internal error: Cannot find extension function %s in global function table", func->fname);
func++;
continue;
}
}
if (!retval_ptr) {
- zend_error(E_WARNING, "%s::__toString() did not return anything", Z_OBJCE_P(object)->name);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::__toString() did not return anything", Z_OBJCE_P(object)->name);
RETURN_FALSE;
}
if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
}
- zend_error(E_WARNING, "Invocation of %s's constructor failed", ce->name);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invocation of %s's constructor failed", ce->name);
RETURN_NULL();
}
if (retval_ptr) {
if (retval_ptr) {
zval_ptr_dtor(&retval_ptr);
}
- zend_error(E_WARNING, "Invocation of %s's constructor failed", ce->name);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invocation of %s's constructor failed", ce->name);
RETURN_NULL();
}
if (retval_ptr) {
if (instanceof_function(Z_OBJCE_P(class_name), reflection_class_ptr TSRMLS_CC)) {
argument = (reflection_object *) zend_object_store_get_object(class_name TSRMLS_CC);
if (argument == NULL || argument->ptr == NULL) {
- zend_error(E_ERROR, "Internal error: Failed to retrieve the argument's reflection object");
+ php_error_docref(NULL TSRMLS_CC, E_ERROR, "Internal error: Failed to retrieve the argument's reflection object");
/* Bails out */
}
class_ce = argument->ptr;
if (instanceof_function(Z_OBJCE_P(interface), reflection_class_ptr TSRMLS_CC)) {
argument = (reflection_object *) zend_object_store_get_object(interface TSRMLS_CC);
if (argument == NULL || argument->ptr == NULL) {
- zend_error(E_ERROR, "Internal error: Failed to retrieve the argument's reflection object");
+ php_error_docref(NULL TSRMLS_CC, E_ERROR, "Internal error: Failed to retrieve the argument's reflection object");
/* Bails out */
}
interface_ce = argument->ptr;
if ((ref->prop.flags & ZEND_ACC_STATIC)) {
zend_update_class_constants(intern->ce TSRMLS_CC);
if (zend_hash_quick_find(CE_STATIC_MEMBERS(intern->ce), ref->prop.name, ref->prop.name_length + 1, ref->prop.h, (void **) &member) == FAILURE) {
- zend_error(E_ERROR, "Internal error: Could not find the property %s::%s", intern->ce->name, ref->prop.name);
+ php_error_docref(NULL TSRMLS_CC, E_ERROR, "Internal error: Could not find the property %s::%s", intern->ce->name, ref->prop.name);
/* Bails out */
}
MAKE_COPY_ZVAL(member, return_value);
prop_table = CE_STATIC_MEMBERS(intern->ce);
if (zend_hash_quick_find(prop_table, ref->prop.name, ref->prop.name_length + 1, ref->prop.h, (void **) &variable_ptr) == FAILURE) {
- zend_error(E_ERROR, "Internal error: Could not find the property %s::%s", intern->ce->name, ref->prop.name);
+ php_error_docref(NULL TSRMLS_CC, E_ERROR, "Internal error: Could not find the property %s::%s", intern->ce->name, ref->prop.name);
/* Bails out */
}
if (*variable_ptr == value) {
/* Is there a better way of doing this? */
while (func->fname) {
if (zend_hash_find(EG(function_table), func->fname, strlen(func->fname) + 1, (void**) &fptr) == FAILURE) {
- zend_error(E_WARNING, "Internal error: Cannot find extension function %s in global function table", func->fname);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Internal error: Cannot find extension function %s in global function table", func->fname);
func++;
continue;
}