]> granicus.if.org Git - php/commitdiff
Just return, no need for RETURN_NULL()
authorAndrea Faulds <ajf@ajf.me>
Tue, 19 Aug 2014 23:11:11 +0000 (00:11 +0100)
committerAndrea Faulds <ajf@ajf.me>
Tue, 19 Aug 2014 23:11:11 +0000 (00:11 +0100)
Zend/zend_closures.c

index 03fcf59e1edf56ae1c2555bfcceb753d6e1e99de..49543251db4acf633679cdfa77d909765a91330c 100644 (file)
@@ -79,7 +79,7 @@ ZEND_METHOD(Closure, call) /* {{{ */
        zend_function my_function;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o*", &newthis, &my_params, &my_param_count) == FAILURE) {
-               RETURN_NULL();
+               return;
        }
        
        zclosure = getThis();
@@ -87,7 +87,7 @@ ZEND_METHOD(Closure, call) /* {{{ */
        
        if (closure->func.common.fn_flags & ZEND_ACC_STATIC) {
                zend_error(E_WARNING, "Cannot bind an instance to a static closure");
-               RETURN_NULL();
+               return;
        }
 
        if (closure->func.type == ZEND_INTERNAL_FUNCTION) {
@@ -95,7 +95,7 @@ ZEND_METHOD(Closure, call) /* {{{ */
                if ((closure->func.common.fn_flags & ZEND_ACC_STATIC) == 0 &&
                                !instanceof_function(Z_OBJCE_P(newthis), closure->func.common.scope TSRMLS_CC)) {
                        zend_error(E_WARNING, "Cannot bind function %s::%s to object of class %s", closure->func.common.scope->name->val, closure->func.common.function_name->val, Z_OBJCE_P(newthis)->name->val);
-                       RETURN_NULL();
+                       return;
                }
        }