From 6f30c0489928b80755fa49c5ed6bc9e1ee05d143 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Mon, 22 Aug 2022 21:27:23 +0800 Subject: [PATCH] fix php 7.4 stuck bug --- src/ZM/Annotation/AnnotationHandler.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ZM/Annotation/AnnotationHandler.php b/src/ZM/Annotation/AnnotationHandler.php index 9a293171..8290ebfa 100644 --- a/src/ZM/Annotation/AnnotationHandler.php +++ b/src/ZM/Annotation/AnnotationHandler.php @@ -130,7 +130,8 @@ class AnnotationHandler { // 由于3.0有额外的插件模式支持,所以注解就不再提供独立的闭包函数调用支持了 // 提取要调用的目标类和方法名称 - $target_class = new ($v->class)(); + $class = $v->class; + $target_class = new $class(); $target_method = $v->method; // 先执行规则,失败就返回false if ($rule_callback !== null && !$rule_callback($v)) {