]> granicus.if.org Git - php/commitdiff
Fix test and add missing initialization
authorMarcus Boerger <helly@php.net>
Sun, 3 Aug 2003 22:03:52 +0000 (22:03 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 3 Aug 2003 22:03:52 +0000 (22:03 +0000)
Zend/zend_compile.c

index 4ff5de2ef9c2857e352b685dee0c9cb6bbff790e..1ff9bb1e37e94ace5e6be25e48e912f5413deaa3 100644 (file)
@@ -932,6 +932,7 @@ void zend_do_begin_function_declaration(znode *function_token, znode *function_n
        op_array.function_name = name;
        op_array.return_reference = return_reference;
        op_array.fn_flags = fn_flags;
+       op_array.pass_rest_by_reference = 0;
 
        op_array.scope = CG(active_class_entry);
        op_array.prototype = NULL;
@@ -1606,7 +1607,15 @@ static zend_bool zend_do_perform_implementation_check(zend_function *fe)
        }
 
        for (i=0; i< fe->common.num_args; i++) {
-               if (strcmp(fe->common.arg_info[i].class_name, fe->common.prototype->common.arg_info[i].class_name)!=0) {
+               if (fe->common.arg_info[i].class_name) {
+                       if (fe->common.prototype->common.arg_info[i].class_name) {
+                               if (strcmp(fe->common.arg_info[i].class_name, fe->common.prototype->common.arg_info[i].class_name)!=0) {
+                                       return 0;
+                               }
+                       } else {
+                               return 0;
+                       }
+               } else if (fe->common.prototype->common.arg_info[i].class_name) {
                        return 0;
                }
                if (fe->common.arg_info[i].pass_by_reference != fe->common.prototype->common.arg_info[i].pass_by_reference) {