HOR-4547: Designer/Import/Classic Process, PHP Notice: Only variables should be passed by reference in /srv/http/processmaker/workflow/engine/methods/processes/processes_Import_Ajax.php on line 391

This commit is contained in:
Roly Rudy Gutierrez Pinto
2018-05-11 09:41:16 -04:00
parent 3d8fe0f6d3
commit 878c8acefb

View File

@@ -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"));
}
}