]> granicus.if.org Git - php/commitdiff
- Improve some error messages.
authorAndi Gutmans <andi@php.net>
Sat, 29 Jun 2002 15:30:27 +0000 (15:30 +0000)
committerAndi Gutmans <andi@php.net>
Sat, 29 Jun 2002 15:30:27 +0000 (15:30 +0000)
Zend/zend_execute.c
Zend/zend_execute_API.c

index 581de6f3e88a60808a170bdcc6982bd0651da9a7..0686326480e1f8462031b12d0bf44f4c3e8950c8 100644 (file)
@@ -2560,7 +2560,7 @@ send_by_ref:
                                                EX(Ts)[EX(opline)->result.u.var].tmp_var = **value;
                                                zval_copy_ctor(&EX(Ts)[EX(opline)->result.u.var].tmp_var);
                                        } else {
-                                               zend_error(E_ERROR, "Undefined constant. Improve this error message");
+                                               zend_error(E_ERROR, "Undefined class constant '%s'", EX(opline)->op2.u.constant.value.str.val);
                                        }
                                }
                                NEXT_OPCODE();
index d6120bf7ce047b539cf29e467add28b38198d6b2..e7515c60c0a714c389bb61257e8f8b56e08ce574 100644 (file)
@@ -337,7 +337,7 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC)
                        last = tsrm_strtok_r(p->value.str.val, ":", &temp);
 
                        if (zend_lookup_class(last, strlen(last), &ce TSRMLS_CC) == FAILURE) {
-                               zend_error(E_ERROR, "Invalid class! Improve this error message");
+                               zend_error(E_ERROR, "Invalid class '%s'", last);
                        }
                        
                        last = tsrm_strtok_r(NULL, ":", &temp);
@@ -348,12 +348,12 @@ ZEND_API int zval_update_constant(zval **pp, void *arg TSRMLS_DC)
                                        break;
                                }
                                if (zend_hash_find(&(*ce)->class_table, last, strlen(last)+1, (void **)&ce) == FAILURE) {
-                                       zend_error(E_ERROR, "Invalid class! Improve this error message");
+                                       zend_error(E_ERROR, "Invalid sub-class '%s'", last);
                                }
                                last = cur;
                        }
                        if (zend_hash_find(&(*ce)->constants_table, last, strlen(last)+1, (void **) &value) == FAILURE) {
-                               zend_error(E_ERROR, "Invalid class! Improve this error message");
+                               zend_error(E_ERROR, "Invalid class constant '%s'", last);
                        }
                        const_value = **value;
                        zval_copy_ctor(&const_value);