PMC-1447 Warning in processes_Import_Ajax.php

This commit is contained in:
Roly Rudy Gutierrez Pinto
2019-11-29 11:57:23 -04:00
parent 1adadaf079
commit a694ff5b20
2 changed files with 3 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ try {
if (\BpmnProject::exists($_GET["pro_uid"]) && isset($_GET['objects'])) {
/*----------------------------------********---------------------------------*/
$_GET["objects"] = \G::json_decode($_GET['objects']);
if (sizeof($_GET['objects']) == 0) {
if (empty($_GET['objects'])) {
/*----------------------------------********---------------------------------*/
$exporter = new ProcessMaker\Exporter\XmlExporter($_GET["pro_uid"]);
$projectName = $exporter->getProjectName();

View File

@@ -144,7 +144,7 @@ if (isset($_FILES["PROCESS_FILENAME"]) && (pathinfo($_FILES["PROCESS_FILENAME"][
}
}
if (isset($_POST['objectsToImport']) && sizeof(G::json_decode($_POST['objectsToImport']))){
if (isset($_POST['objectsToImport']) && !empty(G::json_decode($_POST['objectsToImport']))) {
$objectsToImport = G::json_decode($_POST['objectsToImport']);
}
/*----------------------------------********---------------------------------*/
@@ -301,7 +301,7 @@ if (isset($_POST["PRO_FILENAME"]) &&
}
}
if (isset($_POST['objectsToImport']) && sizeof(G::json_decode($_POST['objectsToImport']))){
if (isset($_POST['objectsToImport']) && !empty(G::json_decode($_POST['objectsToImport']))) {
$objectsToImport = G::json_decode($_POST['objectsToImport']);
}
/*----------------------------------********---------------------------------*/