From 4b54b218d54d2e6bf128330b787770d2bb46bcef Mon Sep 17 00:00:00 2001 From: printempw Date: Fri, 29 Jul 2016 18:53:20 +0800 Subject: [PATCH] fix bug when accessing skinlib without logging in --- app/Controllers/SkinlibController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Controllers/SkinlibController.php b/app/Controllers/SkinlibController.php index 7912b0b0..a9b25ea6 100644 --- a/app/Controllers/SkinlibController.php +++ b/app/Controllers/SkinlibController.php @@ -39,7 +39,7 @@ class SkinlibController extends BaseController } elseif ($filter == "user") { $uid = isset($_GET['uid']) ? $_GET['uid'] : 0; - if ($uid == $this->user->uid) { + if (!is_null($this->user) && $uid == $this->user->uid) { // show private textures when show uploaded textures of current user $textures = Texture::where('uploader', $uid)->orderBy($sort_by, 'desc'); $total_pages = ceil($textures->count() / 20);