From ccdb0ca8e57454370124c2212f3dbd028805e199 Mon Sep 17 00:00:00 2001 From: Taufik Nurrohman Date: Mon, 27 Jan 2025 13:12:18 +0700 Subject: [PATCH] Bug Fix: Layout Getter with Parameter(s) --- about.page | 2 +- index.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/about.page b/about.page index 805d128..2bb4e69 100644 --- a/about.page +++ b/about.page @@ -5,7 +5,7 @@ icon: 'M13,3V9H21V3M13,21H21V11H13M3,21H11V15H3M3,13H11V3H3V13Z' color: '#550bdf' author: Taufik Nurrohman type: Markdown -version: 2.2.0 +version: 2.2.1 ... ### Features diff --git a/index.php b/index.php index 5617488..14db4ff 100644 --- a/index.php +++ b/index.php @@ -2,6 +2,9 @@ namespace { function layout(...$lot) { + if (\is_array($lot[1] ?? [])) { + return \Layout::get(...$lot); + } return \count($lot) < 2 ? \Layout::get(...$lot) : \Layout::set(...$lot); } \lot('date', \lot('time', new \Time($_SERVER['REQUEST_TIME'] ?? \time())));