remove duplicate condition already present a line upper
authorAnatol Belski <ab@php.net>
Thu, 28 Aug 2014 13:37:30 +0000 (15:37 +0200)
committerAnatol Belski <ab@php.net>
Thu, 28 Aug 2014 15:03:39 +0000 (17:03 +0200)
Zend/zend_compile.c

index 47d38c5ee57d8dc03f4ab945e2cd4f676b095b08..961ab4897c9f7c15ed93d33208029631301bb923 100644 (file)
@@ -5303,7 +5303,7 @@ void zend_compile_params(zend_ast *ast TSRMLS_DC) {
                                                        "with array type hint can only be an array or NULL");
                                        }
                                } else if (arg_info->type_hint == IS_CALLABLE && default_ast) {
-                                       if (default_ast && !has_null_default) {
+                                       if (!has_null_default) {
                                                zend_error_noreturn(E_COMPILE_ERROR, "Default value for parameters "
                                                        "with callable type hint can only be NULL");
                                        }