diff --git a/libraries/joomla/filesystem/file.php b/libraries/joomla/filesystem/file.php index 01e728bbb4fb4..f2a1b957a7eed 100644 --- a/libraries/joomla/filesystem/file.php +++ b/libraries/joomla/filesystem/file.php @@ -27,14 +27,7 @@ class JFile */ public static function getExt($file) { - $dot = strrpos($file, '.'); - - if ($dot === false) - { - return ''; - } - - return (string) substr($file, $dot + 1); + return (string) pathinfo($file, PATHINFO_EXTENSION); } /**