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()
110110 $ this ->pjaxContainerId = 'comment-pjax-container- ' . $ this ->getId ();
111111 }
112112
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 })) {
117114 throw new InvalidConfigException (Yii::t ('yii2mod.comments ' , 'The "entityIdAttribute" value for widget model cannot be empty. ' ));
118115 }
119116
117+ $ this ->entity = hash ('crc32 ' , get_class ($ this ->model ));
118+ $ this ->entityId = $ this ->model ->{$ this ->entityIdAttribute };
119+
120120 if (empty ($ this ->relatedTo )) {
121121 $ this ->relatedTo = get_class ($ this ->model ) . ': ' . $ this ->entityId ;
122122 }
You can’t perform that action at this time.
0 commit comments