Skip to content

Commit ba78dbe

Browse files
authored
better error message (#246)
1 parent fc3e4df commit ba78dbe

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

resources/lib/UnitySQL.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ public function deleteAccountDeletionRequest($uid)
233233
public function getSiteVar($name): string
234234
{
235235
$results = $this->search(self::TABLE_SITEVARS, ["name" => $name]);
236+
if (count($results) == 0) {
237+
throw new UnitySQLRecordNotFound($name);
238+
}
236239
assert(count($results) == 1);
237240
return $results[0]["value"];
238241
}

0 commit comments

Comments
 (0)