SITES/ALL/MODULES/WEBFORM/WEBFORM.MODULE
webform.module

  1. severity: normalreview: comment_docblock_fileFile: @file block missing (Drupal Docs) [comment_docblock_file]
  2. severity: normalreview: style_else_spacingLine 565: else statements should begin on a new line [style_else_spacing]
    } else {
  3. severity: criticalreview: security_5Line 2939: Potential problem: form_set_error() and form_error() only accept filtered text, be sure all !placeholders for $variables in t() are fully sanitized using check_plain(), filter_xss() or similar. (Drupal Docs) [security_5]
    form_error($elements, t('!name field is required.', array('!name' => $elements['#title'])));
  4. severity: criticalreview: security_5Line 2944: Potential problem: form_set_error() and form_error() only accept filtered text, be sure all !placeholders for $variables in t() are fully sanitized using check_plain(), filter_xss() or similar. (Drupal Docs) [security_5]
    form_error($elements, t('!name cannot be longer than %max characters but is currently %length characters long.', array('!name' => empty($elements['#title']) ? $elements['#parents'][0] : $elements['#title'], '%max' => $elements['#maxlength'], '%length' => drupal_strlen($elements['#value']))));
  5. severity: normalreview: style_paren_spacingLine 3158: use a space between the closing parenthesis and the open bracket [style_paren_spacing]
    : ($component['page_num'] <= $form_state['storage']['page_num'])){
  6. severity: normalreview: style_function_spacingLine 3177: Functions should be called with no spaces between the function name and opening parentheses [style_function_spacing]
    $page_num = max (1, $page_num);
  7. severity: criticalreview: security_2Line 3340: Potential problem: drupal_set_message() only accepts filtered text, be sure to use check_plain(), filter_xss() or similar to ensure your $variable is fully sanitized. (Drupal Docs) [security_2]
    drupal_set_message(webform_replace_tokens($message, $node, NULL, NULL, TRUE));
  8. severity: normalreview: style_uppercase_constantsLine 3852: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE [style_uppercase_constants]
    return token_replace($string, $token_data, array('clear' => true, 'sanitize' => $sanitize));
  9. severity: normalreview: style_paren_spacingLine 5034: use a space between the closing parenthesis and the open bracket [style_paren_spacing]
    function webform_count_input_vars($element){
CommentFileSizeAuthor
#4 webform-whitespace-2452845-3.patch2.47 KBdanchadwick

Comments

kebz’s picture

Issue summary: View changes
danchadwick’s picture

Priority: Normal » Minor
Issue summary: View changes

Changed to numbered list for ease of reference.

  • DanChadwick committed 26999cd on 7.x-4.x
    Issue #2452845 by DanChadwick: Whitespace and capitalization adjusted to...
  • DanChadwick committed 4b8b876 on 8.x-4.x
    Issue #2452845 by DanChadwick: Whitespace and capitalization adjusted to...
danchadwick’s picture

Status: Active » Fixed
StatusFileSize
new2.47 KB

1. @file added to docblock
2. Changed correct, better "else" whitespace to defective, worse Drupal standard. :)
3 and 4. $element['title'] already sanitized. See core's _form_validate().
5. Add a space.
6. Removed a space. On average, it was perfect before. ;)
7. $message already sanitized.
8. Changed true to TRUE
9. Added a space.

Thanks for the review. Ish. I'm not a fan of sweating whitespace.

Committed to 7.x-4.x and 8.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.