From 76149633a19261ecbb15003be7c2ca8bb6d3ce74 Mon Sep 17 00:00:00 2001 From: Romain Quetiez Date: Wed, 19 Aug 2015 09:59:15 +0000 Subject: [PATCH] #1074 Portal: errors when selecting Impact/Urgency, and if the user has access to his organization only. SVN:trunk[3686] --- application/wizardhelper.class.inc.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/application/wizardhelper.class.inc.php b/application/wizardhelper.class.inc.php index ce22653bb..0751c5b29 100644 --- a/application/wizardhelper.class.inc.php +++ b/application/wizardhelper.class.inc.php @@ -113,8 +113,16 @@ class WizardHelper { // For external keys: load the target object so that external fields // get filled too - $oTargetObj = MetaModel::GetObject($oAttDef->GetTargetClass(), $value); - $oObj->Set($sAttCode, $oTargetObj); + $oTargetObj = MetaModel::GetObject($oAttDef->GetTargetClass(), $value, false); + if ($oTargetObj) + { + $oObj->Set($sAttCode, $oTargetObj); + } + else + { + // May happen for security reasons (portal, see ticket #1074) + $oObj->Set($sAttCode, $value); + } } else {