From: Joe Date: Thu, 3 Apr 2014 14:37:49 +0000 (+0200) Subject: Bad elsif sentense in items.php (image upload) X-Git-Tag: 2.3-final~148 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=8b69feb5fd8bc942338da86e2fef838d33a54826;p=fa-stable.git Bad elsif sentense in items.php (image upload) --- diff --git a/inventory/manage/items.php b/inventory/manage/items.php index f4d3b988..ea831251 100644 --- a/inventory/manage/items.php +++ b/inventory/manage/items.php @@ -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';