PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ????? 2004, PHP 5 Release Candidate 2
+- Force destructors to have empty signatures. (Marcus)
- Stopped file uploads from throwing E_WARNINGs and E_NOTICEs which can not be
hidden from within scripts (and a result value in the $_FILES global can be
used to see the real failure anyway). (Derick)
ctor = reg_function;
} else if (!strcmp(ptr->fname, ZEND_DESTRUCTOR_FUNC_NAME)) {
dtor = reg_function;
+ if (internal_function->num_args) {
+ zend_error(error_type, "Destructor %s::%s() cannot take arguments", scope->name, ptr->fname);
+ }
+
} else if (!strcmp(ptr->fname, ZEND_CLONE_FUNC_NAME)) {
clone = reg_function;
}
zend_op *opline = get_next_op(CG(active_op_array) TSRMLS_CC);
zend_arg_info *cur_arg_info;
+ if (CG(active_class_entry) && CG(active_class_entry)->destructor == (zend_function *) CG(active_op_array))
+ {
+ zend_error(E_COMPILE_ERROR, "Destuctor %s::%s() cannot take arguments", CG(active_class_entry)->name, CG(active_op_array)->function_name);
+ }
CG(active_op_array)->num_args++;
opline->opcode = op;
opline->result = *var;