From a843e96c1f638d2d67ba91e185f02fe1b23c4b2f Mon Sep 17 00:00:00 2001 From: Tobias Diekershoff Date: Thu, 19 Aug 2021 06:57:46 +0200 Subject: [PATCH] use rtrim --- nitter/nitter.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nitter/nitter.php b/nitter/nitter.php index 549356de..e8f3bcdb 100644 --- a/nitter/nitter.php +++ b/nitter/nitter.php @@ -37,10 +37,7 @@ function nitter_install() */ function nitter_addon_admin_post(App $a) { - $nitterserver = trim($_POST['nitterserver']); - if ((substr($apiurl, -1) == '/')) { - $apiurl = substr($apiurl, 0, -1); - } + $nitterserver = rtrim(trim($_POST['nitterserver']),'/'); DI::config()->set('nitter', 'server', $nitterserver); } -- 2.39.5