From faf0f4765adb24452527b761da97cdef5a2e5c1d Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 16 Aug 2006 18:40:42 +0000 Subject: [PATCH] In FetchExtension(), return an empty string if there is no extension --- Functions.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Functions.php b/Functions.php index ff9c13b..a6f9b42 100644 --- a/Functions.php +++ b/Functions.php @@ -514,7 +514,14 @@ class BSFunctions */ public static function FetchExtension($filename) { - return strval(end(explode('.', $filename))); + $array = explode('.', $filename); + + if (sizeof($array) == 1) + { + return ''; + } + + return strval(end($array)); } // ################################################################### -- 2.43.5