Skip to content

Commit 0b86d97

Browse files
committed
better error message (#246)
1 parent 28b57ce commit 0b86d97

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
@@ -236,6 +236,9 @@ public function deleteAccountDeletionRequest($uid)
236236
public function getSiteVar($name): string
237237
{
238238
$results = $this->search(self::TABLE_SITEVARS, ["name" => $name]);
239+
if (count($results) == 0) {
240+
throw new UnitySQLRecordNotFound($name);
241+
}
239242
assert(count($results) == 1);
240243
return $results[0]["value"];
241244
}

0 commit comments

Comments
 (0)