]> granicus.if.org Git - php/commitdiff
Fixed error messages
authorDmitry Stogov <dmitry@zend.com>
Fri, 21 Feb 2014 14:23:56 +0000 (18:23 +0400)
committerDmitry Stogov <dmitry@zend.com>
Fri, 21 Feb 2014 14:23:56 +0000 (18:23 +0400)
Zend/zend_compile.c

index c767729e4762a8ba32be688c2b3374f31d967a56..72d495dd1a5c9b4fbf7760e7478f95fed774c56e 100644 (file)
@@ -3736,10 +3736,10 @@ ZEND_API void zend_do_inheritance(zend_class_entry *ce, zend_class_entry *parent
 
        if ((ce->ce_flags & ZEND_ACC_INTERFACE)
                && !(parent_ce->ce_flags & ZEND_ACC_INTERFACE)) {
-               zend_error_noreturn(E_COMPILE_ERROR, "Interface %s may not inherit from class (%s)", ce->name, parent_ce->name);
+               zend_error_noreturn(E_COMPILE_ERROR, "Interface %s may not inherit from class (%s)", ce->name->val, parent_ce->name->val);
        }
        if (parent_ce->ce_flags & ZEND_ACC_FINAL_CLASS) {
-               zend_error_noreturn(E_COMPILE_ERROR, "Class %s may not inherit from final class (%s)", ce->name, parent_ce->name);
+               zend_error_noreturn(E_COMPILE_ERROR, "Class %s may not inherit from final class (%s)", ce->name->val, parent_ce->name->val);
        }
 
        ce->parent = parent_ce;
@@ -3893,7 +3893,7 @@ ZEND_API void zend_do_implement_interface(zend_class_entry *ce, zend_class_entry
                        if (i < parent_iface_num) {
                                ignore = 1;
                        } else {
-                               zend_error_noreturn(E_COMPILE_ERROR, "Class %s cannot implement previously implemented interface %s", ce->name, iface->name);
+                               zend_error_noreturn(E_COMPILE_ERROR, "Class %s cannot implement previously implemented interface %s", ce->name->val, iface->name->val);
                        }
                }
        }
@@ -4190,7 +4190,7 @@ static void zend_check_trait_usage(zend_class_entry *ce, zend_class_entry *trait
                        return;
                }
        }
-       zend_error_noreturn(E_COMPILE_ERROR, "Required Trait %s wasn't added to %s", trait->name, ce->name);
+       zend_error_noreturn(E_COMPILE_ERROR, "Required Trait %s wasn't added to %s", trait->name->val, ce->name->val);
 }
 /* }}} */
 
@@ -4285,7 +4285,7 @@ static void zend_traits_init_trait_structures(zend_class_entry *ce TSRMLS_DC) /*
                                STR_FREE(lcname);
 
                                if (!method_exists) {
-                                       zend_error_noreturn(E_COMPILE_ERROR, "An alias was defined for %s::%s but this method does not exist", cur_method_ref->ce->name, cur_method_ref->method_name);
+                                       zend_error_noreturn(E_COMPILE_ERROR, "An alias was defined for %s::%s but this method does not exist", cur_method_ref->ce->name->val, cur_method_ref->method_name);
                                }
                        }
                        i++;
@@ -4719,9 +4719,9 @@ ZEND_API zend_class_entry *do_bind_inherited_class(const zend_op_array *op_array
        }
 
        if (parent_ce->ce_flags & ZEND_ACC_INTERFACE) {
-               zend_error_noreturn(E_COMPILE_ERROR, "Class %s cannot extend from interface %s", ce->name, parent_ce->name);
+               zend_error_noreturn(E_COMPILE_ERROR, "Class %s cannot extend from interface %s", ce->name->val, parent_ce->name->val);
        } else if ((parent_ce->ce_flags & ZEND_ACC_TRAIT) == ZEND_ACC_TRAIT) {
-               zend_error_noreturn(E_COMPILE_ERROR, "Class %s cannot extend from trait %s", ce->name, parent_ce->name);
+               zend_error_noreturn(E_COMPILE_ERROR, "Class %s cannot extend from trait %s", ce->name->val, parent_ce->name->val);
        }
 
        zend_do_inheritance(ce, parent_ce TSRMLS_CC);