diff --git a/framework/helper.class.php b/framework/helper.class.php index 8075e939b9..3395ec5c9c 100644 --- a/framework/helper.class.php +++ b/framework/helper.class.php @@ -812,11 +812,19 @@ function getVisions(): array /** * Save debug log to the php log file which prefix with 'debug.'. * - * @param mixed $message + * @param mixed ...$messages * @return void */ -function debug($message = ''): void +function debug(mixed ...$messages): void { + if(count($messages) > 1) + { + foreach($messages as $message) debug($message); + return; + } + + $message = current($messages); + static $times = []; $time = microtime(true); $duration = $times ? $time - end($times) : 0;