diff options
| author | horus | 2021-02-28 19:17:49 +0100 |
|---|---|---|
| committer | horus | 2021-02-28 19:17:49 +0100 |
| commit | 69dcbe18fa3854f08d97ec661309c61c5296459e (patch) | |
| tree | 9cf3cac4569098a4f90ef7e86d55851f2417ecf4 /app/MALUser.php | |
| parent | 522f1dd6c21d716be635484d11cd814172949f2b (diff) | |
| download | senpai-69dcbe18fa3854f08d97ec661309c61c5296459e.tar.gz | |
handles non existing mal user
Diffstat (limited to 'app/MALUser.php')
| -rw-r--r-- | app/MALUser.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/MALUser.php b/app/MALUser.php index 6c62e30..f49d09a 100644 --- a/app/MALUser.php +++ b/app/MALUser.php @@ -36,9 +36,13 @@ class MALUser extends Model $jikan = new MalClient; - $animeList = $jikan->getUserAnimelist( - new \Jikan\Request\User\UserAnimeListRequest( $this->username, 1, 1 ) - ); + try { + $animeList = $jikan->getUserAnimelist( + new \Jikan\Request\User\UserAnimeListRequest( $this->username, 1, 1 ) + ); + } catch (\Exception $e){ + return false; + } $anime = array(); |
