diff --git a/layouts/v7/modules/Settings/PickListDependency/DependencyGraph.tpl b/layouts/v7/modules/Settings/PickListDependency/DependencyGraph.tpl index ba8cef30381b9f5617b0a60b4f7e61e433c065b5..fe456c44af791845dd15a642cee4f77ddf136533 100644 --- a/layouts/v7/modules/Settings/PickListDependency/DependencyGraph.tpl +++ b/layouts/v7/modules/Settings/PickListDependency/DependencyGraph.tpl @@ -87,7 +87,7 @@ {foreach key=TARGET_VALUE item=TRANSLATED_TARGET_VALUE from=$TARGET_PICKLIST_VALUES} <tr> {foreach key=SOURCE_PICKLIST_VALUE item=TRANSLATED_SOURCE_PICKLIST_VALUE from=$SOURCE_PICKLIST_VALUES} - {assign var=targetValues value=$MAPPED_TARGET_PICKLIST_VALUES[$SAFEHTML_SOURCE_PICKLIST_VALUES[$SOURCE_PICKLIST_VALUE]]} + {assign var=targetValues value=(isset($MAPPED_TARGET_PICKLIST_VALUES[$SAFEHTML_SOURCE_PICKLIST_VALUES[$SOURCE_PICKLIST_VALUE]])) ? $MAPPED_TARGET_PICKLIST_VALUES[$SAFEHTML_SOURCE_PICKLIST_VALUES[$SOURCE_PICKLIST_VALUE]] : ''} {assign var=IS_SELECTED value=false} {if empty($targetValues) || in_array($TARGET_VALUE, $targetValues)} {assign var=IS_SELECTED value=true} diff --git a/modules/PickList/DependentPickListUtils.php b/modules/PickList/DependentPickListUtils.php index 42f89a9bece0029ebfa971688530136d1ca74f80..4a8fbf6191b05132194ab6df47836d9a76f4b229 100644 --- a/modules/PickList/DependentPickListUtils.php +++ b/modules/PickList/DependentPickListUtils.php @@ -84,8 +84,8 @@ class Vtiger_DependencyPicklist { $targetValues = $mapping['targetvalues']; $serializedTargetValues = Zend_Json::encode($targetValues); - $optionalsourcefield = $mapping['optionalsourcefield']; - $optionalsourcevalues = $mapping['optionalsourcevalues']; + $optionalsourcefield = isset($mapping['optionalsourcefield']) ? $mapping['optionalsourcefield'] : ''; + $optionalsourcevalues = isset($mapping['optionalsourcevalues']) ? $mapping['optionalsourcevalues'] : ''; if(!empty($optionalsourcefield)) { $criteria = array(); @@ -170,7 +170,7 @@ class Vtiger_DependencyPicklist { $targetValues = decode_html($adb->query_result($result, $i, 'targetvalues')); $unserializedTargetValues = Zend_Json::decode(html_entity_decode($targetValues)); $criteria = decode_html($adb->query_result($result, $i, 'criteria')); - $unserializedCriteria = Zend_Json::decode(html_entity_decode($criteria)); + $unserializedCriteria = isset($criteria) ? Zend_Json::decode(html_entity_decode($criteria)) : ''; if(!empty($unserializedCriteria) && $unserializedCriteria['fieldname'] != null) { $conditionValue = array( diff --git a/modules/Settings/PickListDependency/actions/Index.php b/modules/Settings/PickListDependency/actions/Index.php index 43303b24931d6d08a2f0363e24df71154ec9f077..7af5cb4c6810f7b371ef5127cad40dc26777af6a 100644 --- a/modules/Settings/PickListDependency/actions/Index.php +++ b/modules/Settings/PickListDependency/actions/Index.php @@ -21,6 +21,7 @@ class Settings_PickListDependency_Index_Action extends Settings_Vtiger_Basic_Act $moduleModel = Vtiger_Module_Model::getInstance($module); $sourceField = $request->get('sourcefield'); $targetField = $request->get('targetfield'); + $message=''; $result = Vtiger_DependencyPicklist::checkCyclicDependency($module, $sourceField, $targetField); if($result) { $currentSourceField = Vtiger_DependencyPicklist::getPicklistSourceField($module, $sourceField, $targetField);