Replace ends_with function with Str:endsWith()

This commit is contained in:
DariusIII
2019-07-31 09:36:36 +02:00
parent 7e3c0b2ccd
commit 7c884227f8
3 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -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(
+1
View File
@@ -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
+1 -1
View File
@@ -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').'/']);
}