]> granicus.if.org Git - php/commitdiff
Code rearrangements
authorZeev Suraski <zeev@php.net>
Wed, 29 Jan 2003 15:02:57 +0000 (15:02 +0000)
committerZeev Suraski <zeev@php.net>
Wed, 29 Jan 2003 15:02:57 +0000 (15:02 +0000)
Zend/zend_execute.c
Zend/zend_object_handlers.c

index dedc2e53fdc5d7eaf220c6f31b26e54dbd1f67c3..72548e6248aaf3d144a7ba018f7939db3b050022 100644 (file)
@@ -2413,7 +2413,6 @@ int zend_init_method_call_handler(ZEND_OPCODE_HANDLER_ARGS)
        EX(object) = get_obj_zval_ptr(&EX(opline)->op1, EX(Ts), &EG(free_op1), BP_VAR_R TSRMLS_CC);
                        
        if (EX(object) && EX(object)->type == IS_OBJECT) {
-
                /* First, locate the function. */
                EX(fbc) = Z_OBJ_HT_P(EX(object))->get_method(EX(object), function_name_strval, function_name_strlen TSRMLS_CC);
                if (!EX(fbc)) {
index ff5764e6b01527cb92c49f2e7a974974603e9157..b03aad9ac3359bac894739844ce7d845f8fe49cb 100644 (file)
@@ -396,7 +396,7 @@ static union _zend_function *zend_std_get_method(zval *object, char *method_name
                
        zobj = Z_OBJ_P(object);
        if (zend_hash_find(&zobj->ce->function_table, lc_method_name, method_len+1, (void **)&func_method) == FAILURE) {
-               if (zobj->ce->__call != NULL) {
+               if (zobj->ce->__call) {
                        zend_internal_function *call_user_call = emalloc(sizeof(zend_internal_function));
                        call_user_call->type = ZEND_INTERNAL_FUNCTION;
                        call_user_call->handler = zend_std_call_user_call;
@@ -407,8 +407,9 @@ static union _zend_function *zend_std_get_method(zval *object, char *method_name
 
                        free_alloca(lc_method_name);
                        return (union _zend_function *)call_user_call;
+               } else {
+                       return NULL;
                }
-               zend_error(E_ERROR, "Call to undefined function %s()", method_name);
        }
 
        free_alloca(lc_method_name);