diff --git a/kiri-engine/Abstracts/Component.php b/kiri-engine/Abstracts/Component.php index 3afd6a80..c9e3f5b1 100644 --- a/kiri-engine/Abstracts/Component.php +++ b/kiri-engine/Abstracts/Component.php @@ -231,7 +231,7 @@ class Component implements Configure $context = []; if (is_string($method)) { $message = (empty($method) ? '' : $method . ': ') . $message; - } else if (is_object($method)) { + } else if (!empty($method) && is_object($method)) { $context = [$method]; } $message = "\033[41;37m" . $message . "\033[0m";