From c719da2933626122c687a2c3f38578aec2533bdc Mon Sep 17 00:00:00 2001 From: James Collins Date: Sun, 28 Apr 2024 18:28:53 +1000 Subject: [PATCH] string starts with fix --- app/Models/Media.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Models/Media.php b/app/Models/Media.php index 9268a55..04065e1 100644 --- a/app/Models/Media.php +++ b/app/Models/Media.php @@ -171,11 +171,11 @@ class Media extends Model { $extension = pathinfo($this->name, PATHINFO_EXTENSION); - if(stringStartsWith($this->mime_type, 'image/')) { + if(str_starts_with($this->mime_type, 'image/')) { return 'Image (' . strtoupper($extension) . ')'; - } else if(stringStartsWith($this->mime_type, 'video/')) { + } else if(str_starts_with($this->mime_type, 'video/')) { return 'Video (' . strtoupper($extension) . ')'; - } else if(stringStartsWith($this->mime_type, 'audio/')) { + } else if(str_starts_with($this->mime_type, 'audio/')) { return 'Audio (' . strtoupper($extension) . ')'; } else if($this->mime_type === 'application/pdf') { return 'PDF';