diff --git a/app/Http/Controllers/User/UserController.php b/app/Http/Controllers/User/UserController.php index 6d0e9fa8..7be56acd 100755 --- a/app/Http/Controllers/User/UserController.php +++ b/app/Http/Controllers/User/UserController.php @@ -118,9 +118,9 @@ class UserController extends Controller abort(500, __('Subscription plan does not exist')); } } - $subscribeUrl = config('v2board.app_url', env('APP_URL')); + $subscribeUrl = config('v2board.app_url'); $subscribeUrls = explode(',', config('v2board.subscribe_url')); - if ($subscribeUrls) { + if ($subscribeUrls && $subscribeUrls[0]) { $subscribeUrl = $subscribeUrls[rand(0, count($subscribeUrls) - 1)]; } $user['subscribe_url'] = "{$subscribeUrl}/api/v1/client/subscribe?token={$user['token']}";