diff --git a/application/displayblock.class.inc.php b/application/displayblock.class.inc.php index 45114633d..8f9675566 100644 --- a/application/displayblock.class.inc.php +++ b/application/displayblock.class.inc.php @@ -227,7 +227,13 @@ class DisplayBlock { // render now $sHtml .= "
\n"; - $sHtml .= $this->GetRenderContent($oPage, $aExtraParams, $sId); + try + { + $sHtml .= $this->GetRenderContent($oPage, $aExtraParams, $sId); + } catch (Exception $e) + { + + } $sHtml .= "
\n"; } else diff --git a/core/oql/expression.class.inc.php b/core/oql/expression.class.inc.php index 3bafdd37c..59ce6c5cb 100644 --- a/core/oql/expression.class.inc.php +++ b/core/oql/expression.class.inc.php @@ -786,8 +786,7 @@ class ScalarExpression extends UnaryExpression { /** @var AttributeExternalKey $oAttDef */ $sTarget = $oAttDef->GetTargetClass(); - $oObj = MetaModel::GetObject($sTarget, $this->GetValue()); - + $oObj = MetaModel::GetObject($sTarget, $this->GetValue(), true, true); $aValue['label'] = $oObj->Get("friendlyname"); } } @@ -1017,6 +1016,7 @@ class FieldExpression extends UnaryExpression * @param string sDefault The default value if no relevant label could be computed * * @return The label + * @throws \CoreException */ public function MakeValueLabel($oFilter, $sValue, $sDefault) { @@ -1033,11 +1033,12 @@ class FieldExpression extends UnaryExpression // Exceptions... if ($oAttDef->IsExternalKey()) { + /** @var AttributeExternalKey $oAttDef */ $sObjClass = $oAttDef->GetTargetClass(); $iObjKey = (int)$sValue; if ($iObjKey > 0) { - $oObject = MetaModel::GetObjectWithArchive($sObjClass, $iObjKey); + $oObject = MetaModel::GetObjectWithArchive($sObjClass, $iObjKey, true, true); $sRes = $oObject->GetHyperlink(); } else