From 2582608b34b7485127c075681637208ea17f7fb8 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 4 Oct 2010 04:43:28 +0000 Subject: [PATCH] MINOR No need for a ternary for in_array check in Upload::isValidExtension() (from r101055) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@111577 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- filesystem/Upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filesystem/Upload.php b/filesystem/Upload.php index 53fd81268..399f10801 100644 --- a/filesystem/Upload.php +++ b/filesystem/Upload.php @@ -441,7 +441,7 @@ class Upload_Validator { // Special case for filenames without an extension if(!isset($pathInfo['extension'])) { - return (in_array('', $this->allowedExtensions, true)) ? true : false; + return in_array('', $this->allowedExtensions, true); } else { return (!count($this->allowedExtensions) || in_array(strtolower($pathInfo['extension']), $this->allowedExtensions)); }