Fixed empty Form Submissions Result in NULL Database Entries
https://github.com/LinkStackOrg/LinkStack/issues/577 https://github.com/LinkStackOrg/linkstack-docker/issues/86
This commit is contained in:
parent
be4228cd1c
commit
6dabe3d46e
|
@ -175,7 +175,6 @@ class UserController extends Controller
|
||||||
$LinkTitle = ($request->link_text ?? $request->link_title) ?? $request->title;
|
$LinkTitle = ($request->link_text ?? $request->link_title) ?? $request->title;
|
||||||
$LinkURL = $request->link_url ?? $request->link;
|
$LinkURL = $request->link_url ?? $request->link;
|
||||||
|
|
||||||
|
|
||||||
$OrigLink = Link::find($request->linkid);
|
$OrigLink = Link::find($request->linkid);
|
||||||
|
|
||||||
$customParams = [];
|
$customParams = [];
|
||||||
|
@ -436,6 +435,10 @@ class UserController extends Controller
|
||||||
$links->button_id = $button?->id;
|
$links->button_id = $button?->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(empty($links->button_id)) {
|
||||||
|
return redirect(route('showButtons')); die;
|
||||||
|
}
|
||||||
|
|
||||||
$links->save();
|
$links->save();
|
||||||
|
|
||||||
$links->order = ($links->id - 1);
|
$links->order = ($links->id - 1);
|
||||||
|
|
Loading…
Reference in New Issue