code: public function beforeUpdate($event)
      {
  
          if (is_array($this->fields)) {
              foreach ($this->fields as $field) {
                  if (is_array($event->sender->{$field})) {
                      $event->sender->{$field} = implode(';', $event->sender->{$field});
                  }
              }
          }
  
      }
docs: Change array to string separate by ;
  @param $event