diff --git a/views/manage/index.php b/views/manage/index.php
index 0a00b6c..3af5138 100755
--- a/views/manage/index.php
+++ b/views/manage/index.php
@@ -1,6 +1,7 @@
\Yii::t('artbox-comment', 'Сущность '),
'content' => function (CommentModel $model) {
- $entity = call_user_func($model->entity.'::find');
- $item = $entity->where(['id' => $model->entity_id])->with(['lang' , 'lang.alias'])->one();
- if ($item !== null){
+ try {
+ $entity = call_user_func($model->entity . '::find');
+ } catch (Exception $exception) {
+ return \Yii::$app->formatter->asText('');
+ }
+ $item = $entity->where([ 'id' => $model->entity_id ])
+ ->with(
+ [
+ 'lang',
+ 'lang.alias',
+ ]
+ )
+ ->one();
+ if ($item !== null) {
if ($urlManagerFrontend = \Yii::$app->get('urlManagerFrontend', false)) {
-
- return "".$item->lang->title."";
+
+ return "" . $item->lang->title . "";
}
return $item->lang->title;
--
libgit2 0.21.4