Why i getting an error “Call to a member function formName() on a non-object”
问题 i try to save multilanguaged content My About model ... public function rules() { return [ [['status', 'date_update', 'date_create'], 'integer'], [['date_update', 'date_create'], 'required'], ]; } ... public function getContent($lang_id = null) { $lang_id = ($lang_id === null) ? Lang::getCurrent()->id : $lang_id; return $this->hasOne(AboutLang::className(), ['post_id' => 'id'])->where('lang_id = :lang_id', [':lang_id' => $lang_id]); } My AboutLang model public function rules() { return [ [[