fix getting info of invalid texture

This commit is contained in:
printempw 2016-12-10 19:49:45 +08:00
parent 05edc193ae
commit 55534bb52b

View File

@ -124,7 +124,11 @@ class SkinlibController extends Controller
public function info($tid)
{
return json(Texture::find($tid)->toArray());
if ($t = Texture::find($tid)) {
return json($t->toArray());
} else {
return json([]);
}
}
public function upload()