From 6d2ee8dbeac1b83816d396a0940aae4ea8ba4073 Mon Sep 17 00:00:00 2001 From: kkigomi Date: Sun, 14 Jan 2024 04:45:58 +0900 Subject: [PATCH] =?UTF-8?q?`debugPrint()`=20=ED=95=A8=EC=88=98=EC=97=90=20?= =?UTF-8?q?=ED=8C=8C=EB=9D=BC=EB=AF=B8=ED=84=B0=EB=A5=BC=20=EB=8B=A4?= =?UTF-8?q?=EC=88=98=20=EC=82=AC=EC=9A=A9=ED=95=A0=20=EC=88=98=20=EC=9E=88?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `debugPrint($arg1, $arg2, 'content');` --- common/legacy.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/legacy.php b/common/legacy.php index 8477ab284..397fa0d8a 100644 --- a/common/legacy.php +++ b/common/legacy.php @@ -784,11 +784,16 @@ function getEncodeEmailAddress($email): string /** * Add an entry to the debug log. * - * @param mixed $entry Target object to be printed + * @param mixed ...$entry Target object to be printed * @return void */ -function debugPrint($entry = null): void +function debugPrint(...$entry): void { + if (func_num_args() === 1) + { + $entry = $entry[0]; + } + Rhymix\Framework\Debug::addEntry($entry); }