diff --git a/workflow/engine/methods/processes/processes_Import_Ajax.php b/workflow/engine/methods/processes/processes_Import_Ajax.php index d4e7d84a1..870db04eb 100644 --- a/workflow/engine/methods/processes/processes_Import_Ajax.php +++ b/workflow/engine/methods/processes/processes_Import_Ajax.php @@ -388,8 +388,9 @@ if ($action == "uploadFileNewProcess") { $allowedExtensions = array ($processFileType ); $allowedExtensions = array ('pm'); - if (! in_array( end( explode( ".", $_FILES['PROCESS_FILENAME']['name'] ) ), $allowedExtensions )) { - throw new Exception( G::LoadTranslation( "ID_FILE_UPLOAD_INCORRECT_EXTENSION" ) ); + $explode = explode(".", $_FILES['PROCESS_FILENAME']['name']); + if (!in_array(end($explode), $allowedExtensions)) { + throw new Exception(G::LoadTranslation("ID_FILE_UPLOAD_INCORRECT_EXTENSION")); } }