From 01828392169a1282094ad706393b020060f0c0e4 Mon Sep 17 00:00:00 2001 From: tomolimo Date: Tue, 18 Jun 2019 10:01:08 +0200 Subject: [PATCH] Added a test to be sure that $_FILES['form']['name'] is existin Set version to 3.5.2 --- inc/processmaker.class.php | 4 ++-- processmaker.xml | 4 ++-- setup.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/inc/processmaker.class.php b/inc/processmaker.class.php index 732bb22..72cd854 100644 --- a/inc/processmaker.class.php +++ b/inc/processmaker.class.php @@ -2420,8 +2420,8 @@ class PluginProcessmakerProcessmaker extends CommonDBTM { $data = http_formdata_flat_hierarchy( $request ); // check if any files are in the $_FILES global array // and add them to the curl POST - $fileForm = $_FILES['form']['name']; - if (!empty($fileForm[array_keys($fileForm)[0]][1][array_keys($fileForm[array_keys($fileForm)[0]][1])[0]])) { + $fileForm = isset($_FILES['form']['name']) ? $_FILES['form']['name'] : null; + if (isset($fileForm) && !empty($fileForm[array_keys($fileForm)[0]][1][array_keys($fileForm[array_keys($fileForm)[0]][1])[0]])) { foreach ($_FILES['form']['name'] as $key => $file) { if (is_array($file)) { // it's a grid which contains documents diff --git a/processmaker.xml b/processmaker.xml index 898d1eb..ec7c16b 100644 --- a/processmaker.xml +++ b/processmaker.xml @@ -29,11 +29,11 @@ 9.1 - 3.4.9 + 3.4.10 9.2 - 3.5.1 + 3.5.2 9.3 diff --git a/setup.php b/setup.php index 16f2a77..f8f94ab 100644 --- a/setup.php +++ b/setup.php @@ -2,7 +2,7 @@ // used for case cancellation define("CANCEL", 256); -define('PROCESSMAKER_VERSION', '3.5.1'); +define('PROCESSMAKER_VERSION', '3.5.2'); // Init the hooks of the plugins -Needed function plugin_init_processmaker() {