From 1c41e716af4891beb4b17ffdde3fca3f89a45bc8 Mon Sep 17 00:00:00 2001 From: Grischa Brockhaus Date: Tue, 17 Jul 2007 03:46:04 +0000 Subject: [PATCH] serendipity_parseFileName didn't evaluate the correct name/ext structure for files without extension --- include/functions.inc.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/functions.inc.php b/include/functions.inc.php index 410a3a32..243546ba 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -666,9 +666,14 @@ function serendipity_fetchAuthor($author) { */ function serendipity_parseFileName($file) { $x = explode('.', $file); - $suf = array_pop($x); - $f = @implode('.', $x); - return array($f, $suf); + if (count($x)>1){ + $suf = array_pop($x); + $f = @implode('.', $x); + return array($f, $suf); + } + else { + return array($file,''); + } } /**