X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/4176b598ce8c61b284bcdbb1cb0c05b3a0951c70..refs/pull/4252/head:/app/Http/Controllers/RoleController.php diff --git a/app/Http/Controllers/RoleController.php b/app/Http/Controllers/RoleController.php index 135ba329f..6d397bdae 100644 --- a/app/Http/Controllers/RoleController.php +++ b/app/Http/Controllers/RoleController.php @@ -151,7 +151,8 @@ class RoleController extends Controller $this->checkPermission('user-roles-manage'); try { - $this->permissionsRepo->deleteRole($id, $request->get('migrate_role_id', 0)); + $migrateRoleId = intval($request->get('migrate_role_id') ?: "0"); + $this->permissionsRepo->deleteRole($id, $migrateRoleId); } catch (PermissionsException $e) { $this->showErrorNotification($e->getMessage());