From 06c409d6e898a8aeb8b627b0f3e1866c012c187c Mon Sep 17 00:00:00 2001 From: flashwave Date: Tue, 11 Jun 2024 22:56:04 +0000 Subject: [PATCH] Oops #2 --- src/HanyuuContext.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/HanyuuContext.php b/src/HanyuuContext.php index 07a71b7..ebfa5fc 100644 --- a/src/HanyuuContext.php +++ b/src/HanyuuContext.php @@ -37,7 +37,8 @@ class HanyuuContext { } public function getWebAssetInfo(): ?object { - return json_decode(file_get_contents(HAU_DIR_ASSETS . '/current.json')); + $path = HAU_DIR_ASSETS . '/current.json'; + return is_file($path) ? json_decode(file_get_contents($path)) : null; } public function getTemplating(): SasaeEnvironment {