diff --git a/Blacklight/NZB.php b/Blacklight/NZB.php index c0fd84fe2..ff247e8b7 100755 --- a/Blacklight/NZB.php +++ b/Blacklight/NZB.php @@ -9,6 +9,7 @@ use App\Models\Settings; use App\Models\Collection; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\File; +use Illuminate\Support\Str; /** * Class for reading and writing NZB files on the hard disk, @@ -106,7 +107,7 @@ class NZB $nzbSplitLevel = (int) Settings::settingValue('..nzbsplitlevel'); $this->nzbSplitLevel = $nzbSplitLevel ?? 1; $this->siteNzbPath = (string) Settings::settingValue('..nzbpath'); - if (! ends_with($this->siteNzbPath, '/')) { + if (! Str::endsWith($this->siteNzbPath, '/')) { $this->siteNzbPath .= '/'; } $this->_nzbCommentString = sprintf( diff --git a/Changelog b/Changelog index 3bc29c86b..90f9ab433 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2019-07-31 DariusIII + * Chg: Replace ends_with function with Str:endsWith() * Chg: Update laravel/framework (v5.8.29 => v5.8.30) and rest of the used components to their latest version 2019-07-30 DariusIII * Chg: Update fontawesome to latest version diff --git a/app/Http/Controllers/ProfileController.php b/app/Http/Controllers/ProfileController.php index 68b4a90c6..d951cdc0e 100644 --- a/app/Http/Controllers/ProfileController.php +++ b/app/Http/Controllers/ProfileController.php @@ -147,7 +147,7 @@ class ProfileController extends BasePageController break; case 'submit': - if ($request->has('saburl') && ! ends_with($request->input('saburl'), '/') && trim($request->input('saburl')) !== '') { + if ($request->has('saburl') && ! Str::endsWith($request->input('saburl'), '/') && trim($request->input('saburl')) !== '') { $request->merge(['saburl' => $request->input('saburl').'/']); }