aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r--include/functions.inc.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index 3b7c88bc6..973bd2fbe 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -184,7 +184,8 @@ function get_extension( $filename )
// get_filename_wo_extension( 'test.tar.gz' ) -> 'test.tar'
function get_filename_wo_extension( $filename )
{
- return substr( $filename, 0, strrpos( $filename, '.' ) );
+ $pos = strrpos( $filename, '.' );
+ return ($pos===false) ? $filename : substr( $filename, 0, $pos);
}
/**