svn: /php/php-src/trunk/Zend/ zend_compile.c
| From: | Stefan Marr | Date: | Sun, 12 Dec 2010 17:12:29 +0000 |
| Subject: | svn: /php/php-src/trunk/Zend/ zend_compile.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-64105@lists.php.net to get a copy of this message | ||
gron Sun, 12 Dec 2010 17:12:29 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=306272
Log:
Changed E_ERROR to E_COMPILE_ERROR for Trait compilation errors.
#Thanks for catching this Kalle.
Changed paths:
U php/php-src/trunk/Zend/zend_compile.c
Modified: php/php-src/trunk/Zend/zend_compile.c
===================================================================
--- php/php-src/trunk/Zend/zend_compile.c 2010-12-12 17:09:20 UTC (rev 306271)
+++ php/php-src/trunk/Zend/zend_compile.c 2010-12-12 17:12:29 UTC (rev 306272)
@@ -3459,7 +3459,7 @@
if (zend_hash_quick_find(&ce->function_table, hash_key->arKey, hash_key->nKeyLength,
hash_key->h, (void **)&class_fn) == FAILURE
|| class_fn->common.scope != ce) {
- zend_error(E_ERROR, "Trait method %s has not been applied, because there are collisions
with other trait methods on %s", fn->common.function_name, ce->name);
+ zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because there are
collisions with other trait methods on %s", fn->common.function_name, ce->name);
}
zend_function_dtor(fn);
@@ -3468,7 +3468,7 @@
} else {
/* Add it to result function table */
if (zend_hash_quick_add(resulting_table, hash_key->arKey, hash_key->nKeyLength,
hash_key->h, fn, sizeof(zend_function), NULL)==FAILURE) {
- zend_error(E_ERROR, "Trait method %s has not been applied, because failure occured during
updating resulting trait method table", fn->common.function_name);
+ zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occured
during updating resulting trait method table", fn->common.function_name);
}
}
@@ -3632,7 +3632,7 @@
zend_traits_duplicate_function(&fn_copy, estrdup(fn->common.function_name) TSRMLS_CC);
if (zend_hash_quick_update(&ce->function_table, hash_key->arKey,
hash_key->nKeyLength, hash_key->h, &fn_copy, sizeof(zend_function),
(void**)&fn_copy_p)==FAILURE) {
- zend_error(E_ERROR, "Trait method %s has not been applied, because failure occured during
updating class method table", hash_key->arKey);
+ zend_error(E_COMPILE_ERROR, "Trait method %s has not been applied, because failure occured
during updating class method table", hash_key->arKey);
}
_ADD_MAGIC_METHOD(ce, hash_key->arKey, hash_key->nKeyLength, fn_copy_p);
@@ -3687,7 +3687,7 @@
lcname = zend_str_tolower_dup(aliases[i]->alias, lcname_len);
if (zend_hash_add(target, lcname, lcname_len+1, &fn_copy, sizeof(zend_function),
NULL)==FAILURE) {
- zend_error(E_ERROR, "Failed to add aliased trait method (%s) to the trait table. There
is probably already a trait method with the same name", fn_copy.common.function_name);
+ zend_error(E_COMPILE_ERROR, "Failed to add aliased trait method (%s) to the trait table.
There is probably already a trait method with the same name", fn_copy.common.function_name);
}
/* aliases[i]->function = fn_copy; */
efree(lcname);
@@ -3725,7 +3725,7 @@
}
if (zend_hash_add(target, lcname, fnname_len+1, &fn_copy, sizeof(zend_function),
NULL)==FAILURE) {
- zend_error(E_ERROR, "Failed to add trait method (%s) to the trait table. There is probably
already a trait method with the same name", fn_copy.common.function_name);
+ zend_error(E_COMPILE_ERROR, "Failed to add trait method (%s) to the trait table. There is
probably already a trait method with the same name", fn_copy.common.function_name);
}
}
@@ -3799,7 +3799,7 @@
char* lcname = zend_str_tolower_dup(precedences[i]->trait_method->method_name,
lcname_len);
if (zend_hash_add(exclude_table, lcname, lcname_len, NULL, 0, NULL)==FAILURE) {
- zend_error(E_ERROR, "Failed to evaluate a trait precedence (%s). Method of trait %s was
defined to be excluded multiple times", precedences[i]->trait_method->method_name,
trait->name);
+ zend_error(E_COMPILE_ERROR, "Failed to evaluate a trait precedence (%s). Method of
trait %s was defined to be excluded multiple times",
precedences[i]->trait_method->method_name, trait->name);
}
efree(lcname);
}