diff --git a/app/Http/Controllers/BoardController.php b/app/Http/Controllers/BoardController.php index 96ada09..26e2572 100644 --- a/app/Http/Controllers/BoardController.php +++ b/app/Http/Controllers/BoardController.php @@ -267,7 +267,7 @@ class BoardController extends Controller { $valid = $this->objAuth->getPermissions($request->username, $request->password); if ($valid['for_editown'] == 1) { - if ($request->for_id !== 0) { + if (isset($request->for_id)) { DB::table('for_bookmarks') ->where('user_id', $check) ->where('for_id', $request->for_id) @@ -275,8 +275,8 @@ class BoardController extends Controller { return 'Success!'; } - else if ($request->top_id !== 0) { - DB::table('for_bookmarks') + else if (isset($request->top_id)) { + $res = DB::table('for_bookmarks') ->where('user_id', $check) ->where('top_id', $request->top_id) ->delete();