From 9ed12c2b1cd673787720c3c6a9e5bbccc85ea3d6 Mon Sep 17 00:00:00 2001 From: Remco Date: Mon, 19 Jan 2026 20:51:21 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=86=99=20More=20fixes=20=F0=9F=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Updated_Cms/app/Models/Miscellaneous/WebsiteBetaCode.php | 3 +++ .../app/Models/Miscellaneous/WebsiteMaintenanceTask.php | 3 +++ Updated_Cms/app/Models/WebsiteAd.php | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Updated_Cms/app/Models/Miscellaneous/WebsiteBetaCode.php b/Updated_Cms/app/Models/Miscellaneous/WebsiteBetaCode.php index b4a90126a8..c20ea8d7c5 100644 --- a/Updated_Cms/app/Models/Miscellaneous/WebsiteBetaCode.php +++ b/Updated_Cms/app/Models/Miscellaneous/WebsiteBetaCode.php @@ -10,6 +10,9 @@ class WebsiteBetaCode extends Model { protected $guarded = ['id']; + /** + * @return BelongsTo + */ public function user(): BelongsTo { return $this->belongsTo(User::class); diff --git a/Updated_Cms/app/Models/Miscellaneous/WebsiteMaintenanceTask.php b/Updated_Cms/app/Models/Miscellaneous/WebsiteMaintenanceTask.php index eb9a0400ea..a046552c22 100644 --- a/Updated_Cms/app/Models/Miscellaneous/WebsiteMaintenanceTask.php +++ b/Updated_Cms/app/Models/Miscellaneous/WebsiteMaintenanceTask.php @@ -10,6 +10,9 @@ class WebsiteMaintenanceTask extends Model { protected $guarded = []; + /** + * @return BelongsTo + */ public function user(): BelongsTo { return $this->belongsTo(User::class); diff --git a/Updated_Cms/app/Models/WebsiteAd.php b/Updated_Cms/app/Models/WebsiteAd.php index 4fe8379c1c..5815a2c799 100644 --- a/Updated_Cms/app/Models/WebsiteAd.php +++ b/Updated_Cms/app/Models/WebsiteAd.php @@ -29,7 +29,9 @@ class WebsiteAd extends Model $adsPicturePath = Cache::remember('ads_picture_path', 3600, fn () => $settingsService->getOrDefault('ads_picture_path')); if (! str_starts_with($adsPicturePath, 'http')) { - $adsPicturePath = rtrim(strval(config('app.url') ?? ''), '/') . '/' . ltrim($adsPicturePath, '/'); + $appUrl = config('app.url'); + $appUrl = is_string($appUrl) ? $appUrl : ''; + $adsPicturePath = rtrim($appUrl, '/') . '/' . ltrim($adsPicturePath, '/'); } return rtrim($adsPicturePath, '/') . '/' . $this->image; });