From 34d0b3f788a4f70e23d9560935269863e884a63f Mon Sep 17 00:00:00 2001 From: plegall Date: Fri, 25 Oct 2024 10:26:07 +0200 Subject: [PATCH] (cp eeef62378) Correct way to check file type --- picture.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/picture.php b/picture.php index 153f6276b..c8378de4b 100644 --- a/picture.php +++ b/picture.php @@ -971,7 +971,7 @@ SELECT id, name, permalink } } -if (str_ends_with(strtolower($picture['current']['file']), "pdf" )) { +if (in_array(strtolower(get_extension($picture['current']['file'])), array('pdf'))) { $template->assign( array( 'PDF_VIEWER_FILESIZE_THRESHOLD' => $conf['pdf_viewer_filesize_threshold']*1024,