summaryrefslogtreecommitdiff
path: root/ext/reflection/php_reflection.c
diff options
context:
space:
mode:
authorJohannes Schlüter <johannes@php.net>2010-03-30 21:02:32 +0000
committerJohannes Schlüter <johannes@php.net>2010-03-30 21:02:32 +0000
commit4dc1cef4fe8ddb6051f1e4015046a6667d46998f (patch)
tree7c6c8ecd24d56ffc6dcf9fe8fbc01f31b88f02e5 /ext/reflection/php_reflection.c
parent658fe1d0c33b28c85cab53dfcbed03546007af52 (diff)
downloadphp-git-4dc1cef4fe8ddb6051f1e4015046a6667d46998f.tar.gz
Use php_error_docref instead of zend_error
Diffstat (limited to 'ext/reflection/php_reflection.c')
-rw-r--r--ext/reflection/php_reflection.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index d1f90e3455..98928b3b0e 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -79,7 +79,7 @@ ZEND_DECLARE_MODULE_GLOBALS(reflection)
#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; \
} \
@@ -97,7 +97,7 @@ ZEND_DECLARE_MODULE_GLOBALS(reflection)
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; \
@@ -1079,7 +1079,7 @@ static void _extension_string(string *str, zend_module_entry *module, char *inde
/* 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;
}
@@ -1427,7 +1427,7 @@ ZEND_METHOD(reflection, export)
}
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;
}
@@ -3895,7 +3895,7 @@ ZEND_METHOD(reflection_class, newInstance)
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) {
@@ -3975,7 +3975,7 @@ ZEND_METHOD(reflection_class, newInstanceArgs)
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) {
@@ -4090,7 +4090,7 @@ ZEND_METHOD(reflection_class, isSubclassOf)
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;
@@ -4135,7 +4135,7 @@ ZEND_METHOD(reflection_class, implementsInterface)
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;
@@ -4520,7 +4520,7 @@ ZEND_METHOD(reflection_property, getValue)
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);
@@ -4575,7 +4575,7 @@ ZEND_METHOD(reflection_property, setValue)
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) {
@@ -4809,7 +4809,7 @@ ZEND_METHOD(reflection_extension, getFunctions)
/* 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;
}