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:
parent
690f53c8f5
commit
fd38a2df86
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user