Commit 7569741b authored by Miguel Guerreiro's avatar Miguel Guerreiro Committed by Miguel Guerreiro
Browse files

Issue #3168677 by gueguerreiro: Comment required condition is flipped

parent fb4dec95
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ class HelpfulnessBlockForm extends FormBase {
    }

    $comment_required = $config->get('helpfulness_comment_required') ?? 0;
    if (!$comment_required) {
    if ($comment_required) {
      $comment_text = strip_tags($form_state->getValue('helpfulness_comments'));
      if (strlen($comment_text) < 1) {
        $form_state->setErrorByName('helpfulness_comments', $config->get('helpfulness_comment_required_message'));