1
0
mirror of https://github.com/Kovah/LinkAce.git synced 2025-02-23 18:53:13 +01:00

Correct data handling in link controller

This commit is contained in:
Kovah 2018-08-27 13:00:22 +02:00
parent 690f53c8f5
commit fd38a2df86
No known key found for this signature in database
GPG Key ID: AAAA031BA9830D7B

View File

@ -54,7 +54,7 @@ class LinkController extends Controller
// Set the user ID
$data['user_id'] = auth()->user()->id;
$data['category_id'] = $data['category_id'] > 0 ?: null;
$data['category_id'] = isset($data['category_id']) && $data['category_id'] > 0 ?: null;
// Create the new link
$link = Link::create($data);