cvs: ZendEngine2 / zend_API.c

From: Date: Sun, 17 Aug 2003 00:57:36 +0000
Subject: cvs: ZendEngine2 / zend_API.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1636@lists.php.net to get a copy of this message
helly Sat Aug 16 20:57:36 2003 EDT Modified files: /ZendEngine2 zend_API.c Log: - Show class names in error messages when dealing with methods - Mark class as abstract if it gets an abstract method Index: ZendEngine2/zend_API.c diff -u ZendEngine2/zend_API.c:1.197 ZendEngine2/zend_API.c:1.198 --- ZendEngine2/zend_API.c:1.197 Sat Aug 16 16:46:22 2003 +++ ZendEngine2/zend_API.c Sat Aug 16 20:57:35 2003 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_API.c,v 1.197 2003/08/16 20:46:22 helly Exp $ */ +/* $Id: zend_API.c,v 1.198 2003/08/17 00:57:35 helly Exp $ */ #include "zend.h" #include "zend_execute.h" @@ -1179,16 +1179,22 @@ } if (ptr->flags) { if (!(ptr->flags & ZEND_ACC_PPP_MASK)) { - zend_error(error_type, "Invalid access level for %s() - access must be exactly one of public, protected or private", ptr->fname); + zend_error(error_type, "Invalid access level for %s%s%s() - access must be exactly one of public, protected or private", scope ? scope->name : "", scope ? "::" : "", ptr->fname); } internal_function->fn_flags = ptr->flags; } else { internal_function->fn_flags = ZEND_ACC_PUBLIC; } - if (!internal_function->handler && !(ptr->flags&ZEND_ACC_ABSTRACT)) { - zend_error(error_type, "Null function defined as active function"); - zend_unregister_functions(functions, count, target_function_table TSRMLS_CC); - return FAILURE; + if (ptr->flags&ZEND_ACC_ABSTRACT) { + if (scope) { + scope->ce_flags |= ZEND_ACC_ABSTRACT; + } + } else { + if (!internal_function->handler) { + zend_error(error_type, "Method %s%s%s() cannot be a NULL function", scope ? scope->name : "", scope ? "::" : "", ptr->fname); + zend_unregister_functions(functions, count, target_function_table TSRMLS_CC); + return FAILURE; + } } fname_len = strlen(ptr->fname); lowercase_name = do_alloca(fname_len+1);

« previous php.zend-engine.cvs (#1636) next »