Bad elsif sentense in items.php (image upload)
authorJoe <unknown>
Thu, 3 Apr 2014 14:37:49 +0000 (16:37 +0200)
committerJoe <unknown>
Thu, 3 Apr 2014 14:37:49 +0000 (16:37 +0200)
inventory/manage/items.php

index f4d3b988e4623e86114ad837783ebe77c6341799..ea83125144d8db62d5cf5f90bf7e85805be55f45 100644 (file)
@@ -74,8 +74,8 @@ if (isset($_FILES['pic']) && $_FILES['pic']['name'] != '')
        {       //File type Check
                display_warning( _('Only graphics files can be uploaded'));
                $upload_file ='No';
-       }       
-       elseif (@strtoupper(substr(trim($_FILES['pic']['name']), @in_array(strlen($_FILES['pic']['name']) - 3)), array('JPG','PNG','GIF')))
+       }
+       elseif (!in_array(strtoupper(substr(trim($_FILES['pic']['name']), strlen($_FILES['pic']['name']) - 3)), array('JPG','PNG','GIF')))
        {
                display_warning(_('Only graphics files are supported - a file extension of .jpg, .png or .gif is expected'));
                $upload_file ='No';