File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -110,13 +110,13 @@ public function init()
110
110
$ this ->pjaxContainerId = 'comment-pjax-container- ' . $ this ->getId ();
111
111
}
112
112
113
- $ this ->entity = hash ('crc32 ' , get_class ($ this ->model ));
114
- $ this ->entityId = $ this ->model ->{$ this ->entityIdAttribute };
115
-
116
- if (empty ($ this ->entityId )) {
113
+ if (empty ($ this ->model ->{$ this ->entityIdAttribute })) {
117
114
throw new InvalidConfigException (Yii::t ('yii2mod.comments ' , 'The "entityIdAttribute" value for widget model cannot be empty. ' ));
118
115
}
119
116
117
+ $ this ->entity = hash ('crc32 ' , get_class ($ this ->model ));
118
+ $ this ->entityId = $ this ->model ->{$ this ->entityIdAttribute };
119
+
120
120
if (empty ($ this ->relatedTo )) {
121
121
$ this ->relatedTo = get_class ($ this ->model ) . ': ' . $ this ->entityId ;
122
122
}
You can’t perform that action at this time.
0 commit comments