]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-7.0' into PHP-7.1
authorXinchen Hui <laruence@gmail.com>
Thu, 24 Nov 2016 04:03:23 +0000 (12:03 +0800)
committerXinchen Hui <laruence@gmail.com>
Thu, 24 Nov 2016 04:03:44 +0000 (12:03 +0800)
* PHP-7.0:
  Fixed bug #73585 (Logging of "Internal Zend error - Missing class information" missing class name)

1  2 
Zend/zend_compile.c

index 47cc6c649c8d811295e2c9205785aeaf1c04ebea,ca6b7f29c36c37a7157ccb7f28a584a551544892..63359dfa39059ea8c882398a24588d9c74e6c941
@@@ -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