This commit is contained in:
Manuel Raynaud
2013-09-30 10:35:34 +02:00
parent 43b5a129f7
commit c65ec67bdf
168 changed files with 577 additions and 818 deletions

View File

@@ -25,17 +25,16 @@ namespace Thelia\Tools;
class Image
{
static public function isImage($filePath, $allowedImageTypes = null)
public static function isImage($filePath, $allowedImageTypes = null)
{
$imageFile = getimagesize($filePath);
$imageType = $imageFile[2];
if(!is_array($allowedImageTypes) && $imageType != IMAGETYPE_UNKNOWN) {
if (!is_array($allowedImageTypes) && $imageType != IMAGETYPE_UNKNOWN) {
return true;
}
if(in_array($imageType , $allowedImageTypes))
{
if (in_array($imageType , $allowedImageTypes)) {
return true;
}