This commit is contained in:
2024-02-09 17:08:07 +08:00
parent 3f614ae8cd
commit a21b949512
+5 -1
View File
@@ -119,7 +119,11 @@ class Scanner extends Component
if (!class_exists($attribute->getName())) { if (!class_exists($attribute->getName())) {
continue; continue;
} }
$attribute->newInstance()->dispatch($class, $method->getName()); $instance = $attribute->newInstance();
if (!method_exists($instance, 'dispatch')) {
continue;
}
$instance->dispatch($class, $method->getName());
} }
} }
} }