summaryrefslogtreecommitdiff
path: root/Zend/zend_compile.c
diff options
context:
space:
mode:
authorChristopher Jones <sixd@php.net>2012-10-08 16:13:07 -0700
committerChristopher Jones <sixd@php.net>2012-10-08 16:13:07 -0700
commit91169fb24fa2c63d6cbab226a02d5fef277ea11b (patch)
tree8d088abd1cfaf881697f87b59e230ddbf3863b7f /Zend/zend_compile.c
parentf0c65bc0e3bb4565101a9dadb8fb01ef2a760d49 (diff)
parent67611c67fa5a3b2c199d41ef7df3307308c56faa (diff)
downloadphp-git-91169fb24fa2c63d6cbab226a02d5fef277ea11b.tar.gz
Merge branch 'PHP-5.4' of https://git.php.net/repository/php-src into PHP-5.4
* 'PHP-5.4' of https://git.php.net/repository/php-src: (45 commits) Fixed bug #63219 (Segfault when aliasing trait method when autoloader throws excpetion) exposing the libxpm version in phpinfo 5.4.9-dev PHP-5.3 branch is 5.3.19 now reverted the previous fix for libpng include fixed include checks for libpng under win Avoding superfluous function call Add test for #35895 Now we can set the tsrm_ls manually Fixed bug #63184 test (ext/spl/tests/RecursiveDirectoryIterator_getSubPathname_basic.phpt failed) add news for --offline add --offline option to run-tests command Bug #63147: SKIP_ONLINE_TESTS, for getmxrr Bug #63147: introduce SKIP_ONLINE_TESTS, for gethostbyname gethostbyname_basic002.phpt is a duplicate to gethostbyname_error004.phpt add bug #63162 fix test and move to proper place synergy ftl. Removed duplicate fields. adding test phpt Bug #63162 - parse_url does not matches password component ...
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r--Zend/zend_compile.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c
index c39d8eaa1e..303eedb6bc 100644
--- a/Zend/zend_compile.c
+++ b/Zend/zend_compile.c
@@ -3975,8 +3975,10 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce TSRMLS_DC) /*
/** Resolve classes for all precedence operations. */
if (cur_precedence->exclude_from_classes) {
cur_method_ref = cur_precedence->trait_method;
- cur_precedence->trait_method->ce = zend_fetch_class(cur_method_ref->class_name,
- cur_method_ref->cname_len, ZEND_FETCH_CLASS_TRAIT TSRMLS_CC);
+ if (!(cur_precedence->trait_method->ce = zend_fetch_class(cur_method_ref->class_name, cur_method_ref->cname_len,
+ ZEND_FETCH_CLASS_TRAIT|ZEND_FETCH_CLASS_NO_AUTOLOAD TSRMLS_CC))) {
+ zend_error(E_COMPILE_ERROR, "Could not find trait %s", cur_method_ref->class_name);
+ }
/** Ensure that the prefered method is actually available. */
lcname = zend_str_tolower_dup(cur_method_ref->method_name,
@@ -4003,7 +4005,9 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce TSRMLS_DC) /*
char* class_name = (char*)cur_precedence->exclude_from_classes[j];
zend_uint name_length = strlen(class_name);
- cur_precedence->exclude_from_classes[j] = zend_fetch_class(class_name, name_length, ZEND_FETCH_CLASS_TRAIT TSRMLS_CC);
+ if (!(cur_precedence->exclude_from_classes[j] = zend_fetch_class(class_name, name_length, ZEND_FETCH_CLASS_TRAIT |ZEND_FETCH_CLASS_NO_AUTOLOAD TSRMLS_CC))) {
+ zend_error(E_COMPILE_ERROR, "Could not find trait %s", class_name);
+ }
/* make sure that the trait method is not from a class mentioned in
exclude_from_classes, for consistency */
@@ -4030,7 +4034,9 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce TSRMLS_DC) /*
/** For all aliases with an explicit class name, resolve the class now. */
if (ce->trait_aliases[i]->trait_method->class_name) {
cur_method_ref = ce->trait_aliases[i]->trait_method;
- cur_method_ref->ce = zend_fetch_class(cur_method_ref->class_name, cur_method_ref->cname_len, ZEND_FETCH_CLASS_TRAIT TSRMLS_CC);
+ if (!(cur_method_ref->ce = zend_fetch_class(cur_method_ref->class_name, cur_method_ref->cname_len, ZEND_FETCH_CLASS_TRAIT|ZEND_FETCH_CLASS_NO_AUTOLOAD TSRMLS_CC))) {
+ zend_error(E_COMPILE_ERROR, "Could not find trait %s", cur_method_ref->class_name);
+ }
/** And, ensure that the referenced method is resolvable, too. */
lcname = zend_str_tolower_dup(cur_method_ref->method_name,