HOR-937 "PHP Notice: when you save a process classic" SOLVED
Issue:
PHP Notice: when you save a process classic
Cause:
La funcion array_diff_assoc solo hace la comparacion con arrays unidimensionales
Solution:
Se elimina el campo PRO_DYNAFORMS, el mismo no es utilizado/requerido en el script
This commit is contained in:
@@ -32,6 +32,8 @@
|
|||||||
$function = isset( $_POST['function'] ) ? $_POST['function'] : '';
|
$function = isset( $_POST['function'] ) ? $_POST['function'] : '';
|
||||||
$infoProcess = new Process();
|
$infoProcess = new Process();
|
||||||
$resultProcessOld = $infoProcess->load($_POST['form']['PRO_UID']);
|
$resultProcessOld = $infoProcess->load($_POST['form']['PRO_UID']);
|
||||||
|
unset($resultProcessOld['PRO_DYNAFORMS']);
|
||||||
|
|
||||||
switch ($function) {
|
switch ($function) {
|
||||||
case 'lookForNameProcess':
|
case 'lookForNameProcess':
|
||||||
require_once 'classes/model/Content.php';
|
require_once 'classes/model/Content.php';
|
||||||
@@ -93,8 +95,10 @@ switch ($function) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$resultProcessNew = $infoProcess->load($_POST['form']['PRO_UID']);
|
$resultProcessNew = $infoProcess->load($_POST['form']['PRO_UID']);
|
||||||
$oldFields = array_diff_assoc($resultProcessOld,$resultProcessNew);
|
unset($resultProcessNew['PRO_DYNAFORMS']);
|
||||||
|
|
||||||
$newFields = array_diff_assoc($resultProcessNew,$resultProcessOld);
|
$newFields = array_diff_assoc($resultProcessNew,$resultProcessOld);
|
||||||
$fields = array();
|
$fields = array();
|
||||||
|
|
||||||
@@ -114,7 +118,7 @@ if(array_key_exists('PRO_SUMMARY_DYNAFORM', $newFields)) {
|
|||||||
$fields[] = "Dynaform to show a case summary";
|
$fields[] = "Dynaform to show a case summary";
|
||||||
}
|
}
|
||||||
if(array_key_exists('PRO_DERIVATION_SCREEN_TPL', $newFields)) {
|
if(array_key_exists('PRO_DERIVATION_SCREEN_TPL', $newFields)) {
|
||||||
$fields[] = "Routing Screen Template";
|
$fields[] = "Routing Screen Template";
|
||||||
}
|
}
|
||||||
if(array_key_exists('PRO_DEBUG', $newFields)) {
|
if(array_key_exists('PRO_DEBUG', $newFields)) {
|
||||||
$fields[] = G::LoadTranslation('ID_PRO_DEBUG');
|
$fields[] = G::LoadTranslation('ID_PRO_DEBUG');
|
||||||
@@ -147,7 +151,7 @@ G::auditLog('EditProcess','Edit fields ('.implode(', ',$fields).') in process "'
|
|||||||
|
|
||||||
if(isset($_POST['form']['PRO_UID']) && !empty($_POST['form']['PRO_UID'])) {
|
if(isset($_POST['form']['PRO_UID']) && !empty($_POST['form']['PRO_UID'])) {
|
||||||
$valuesProcess['PRO_UID'] = $_POST['form']['PRO_UID'];
|
$valuesProcess['PRO_UID'] = $_POST['form']['PRO_UID'];
|
||||||
$valuesProcess['PRO_UPDATE_DATE'] = date("Y-m-d H:i:s");
|
$valuesProcess['PRO_UPDATE_DATE'] = date("Y-m-d H:i:s");
|
||||||
G::LoadClass('processes');
|
G::LoadClass('processes');
|
||||||
$infoProcess = new Processes();
|
$infoProcess = new Processes();
|
||||||
$resultProcess = $infoProcess->updateProcessRow($valuesProcess);
|
$resultProcess = $infoProcess->updateProcessRow($valuesProcess);
|
||||||
|
|||||||
Reference in New Issue
Block a user