Fixed InvalidArgumentException namespace - Issue #1

This commit is contained in:
Daniel Thee Roperto
2016-09-02 13:32:26 +10:00
parent 2cf9afb5c5
commit 729c8f521a

View File

@@ -60,10 +60,10 @@ final class outagedb
global $DB;
if (!is_int($id)) {
throw new InvalidArgumentException('$id must be an int.');
throw new \InvalidArgumentException('$id must be an int.');
}
if ($id <= 0) {
throw new InvalidArgumentException('$id must be positive.');
throw new \InvalidArgumentException('$id must be positive.');
}
$outage = $DB->get_record('auth_outage', ['id' => $id]);
@@ -116,10 +116,10 @@ final class outagedb
global $DB;
if (!is_int($id)) {
throw new InvalidArgumentException('$id must be an int.');
throw new \InvalidArgumentException('$id must be an int.');
}
if ($id <= 0) {
throw new InvalidArgumentException('$id must be positive.');
throw new \InvalidArgumentException('$id must be positive.');
}
$DB->delete_records('auth_outage', ['id' => $id]);