From a8d6ada205931ac5687769d610f2fa972335aff8 Mon Sep 17 00:00:00 2001 From: Simon Leary Date: Sat, 7 Jun 2025 17:02:44 -0400 Subject: [PATCH] better error message --- resources/lib/UnitySQL.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/lib/UnitySQL.php b/resources/lib/UnitySQL.php index 75a78243..85ed3afd 100644 --- a/resources/lib/UnitySQL.php +++ b/resources/lib/UnitySQL.php @@ -233,6 +233,9 @@ public function deleteAccountDeletionRequest($uid) public function getSiteVar($name): string { $results = $this->search(self::TABLE_SITEVARS, ["name" => $name]); + if (count($results) == 0) { + throw new UnitySQLRecordNotFound($name); + } assert(count($results) == 1); return $results[0]["value"]; }