diff options
author | Zeev Suraski <zeev@php.net> | 1999-06-11 13:37:29 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 1999-06-11 13:37:29 +0000 |
commit | 54d210427adc1fa0b55235b14539d0e9247c988c (patch) | |
tree | 8a74c516956963640aebd46632e78811350ed2df /Zend/zend_compile.c | |
parent | f8bac0f8ad8e3865e3a8fb6992dc6e4b76306f38 (diff) | |
download | php-git-54d210427adc1fa0b55235b14539d0e9247c988c.tar.gz |
Two fixes:
* The error generated by a failed class inheritence wasn't properly
displaying the file in which he error occured.
* Inheritence didn't work if the parent class had uppercase letters in it.
Diffstat (limited to 'Zend/zend_compile.c')
-rw-r--r-- | Zend/zend_compile.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 28043472f6..11071a879c 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -1193,8 +1193,10 @@ void do_begin_class_declaration(znode *class_name, znode *parent_class_name CLS_ zend_function tmp_zend_function; zval *tmp; + zend_str_tolower(parent_class_name->u.constant.value.str.val, parent_class_name->u.constant.value.str.len); + if (zend_hash_find(CG(class_table), parent_class_name->u.constant.value.str.val, parent_class_name->u.constant.value.str.len+1, (void **) &parent_class)==FAILURE) { - zend_error(E_ERROR, "Undefined parent class '%s'", parent_class_name->u.constant.value.str.val); + zend_error(E_COMPILE_ERROR, "Undefined parent class '%s'", parent_class_name->u.constant.value.str.val); return; } /* copy functions */ |