From: Xinchen Hui Date: Thu, 24 Nov 2016 04:03:23 +0000 (+0800) Subject: Merge branch 'PHP-7.0' into PHP-7.1 X-Git-Tag: php-7.1.1RC1~196 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c1c91c95a6eaa40dced29813a085d47a24cc7b07;p=php Merge branch 'PHP-7.0' into PHP-7.1 * PHP-7.0: Fixed bug #73585 (Logging of "Internal Zend error - Missing class information" missing class name) --- c1c91c95a6eaa40dced29813a085d47a24cc7b07 diff --cc Zend/zend_compile.c index 47cc6c649c,ca6b7f29c3..63359dfa39 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@@ -1099,21 -993,19 +1099,19 @@@ ZEND_API int do_bind_function(const zen ZEND_API zend_class_entry *do_bind_class(const zend_op_array* op_array, const zend_op *opline, HashTable *class_table, zend_bool compile_time) /* {{{ */ { zend_class_entry *ce; - zval *op1, *op2; + zval *lcname, *rtd_key; if (compile_time) { - op1 = CT_CONSTANT_EX(op_array, opline->op1.constant); - op2 = CT_CONSTANT_EX(op_array, opline->op2.constant); + lcname = CT_CONSTANT_EX(op_array, opline->op1.constant); + rtd_key = lcname + 1; } else { - op1 = RT_CONSTANT(op_array, opline->op1); - op2 = RT_CONSTANT(op_array, opline->op2); + lcname = RT_CONSTANT(op_array, opline->op1); + rtd_key = lcname + 1; } - if ((ce = zend_hash_find_ptr(class_table, Z_STR_P(rtd_key))) == NULL) { - zend_error_noreturn(E_COMPILE_ERROR, "Internal Zend error - Missing class information for %s", Z_STRVAL_P(rtd_key)); - return NULL; - } - ce = zend_hash_find_ptr(class_table, Z_STR_P(op1)); ++ ce = zend_hash_find_ptr(class_table, Z_STR_P(rtd_key)); + ZEND_ASSERT(ce); ce->refcount++; - if (zend_hash_add_ptr(class_table, Z_STR_P(op2), ce) == NULL) { + if (zend_hash_add_ptr(class_table, Z_STR_P(lcname), ce) == NULL) { ce->refcount--; if (!compile_time) { /* If we're in compile time, in practice, it's quite possible