Code review (upload)

  • : Function ereg() is deprecated in /opt/home/drupalcode/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /opt/home/drupalcode/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /opt/home/drupalcode/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /opt/home/drupalcode/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /opt/home/drupalcode/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /opt/home/drupalcode/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /opt/home/drupalcode/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /opt/home/drupalcode/public_html/includes/file.inc on line 649.
  • : Function ereg() is deprecated in /opt/home/drupalcode/public_html/includes/file.inc on line 649.
Coder found 1 projects, 1 files
Coder provides helpful hints without false positives, but offers no guarantee for creating good code. You are the final arbitrar. If in doubt, read the Drupal documentation (see review links below and api.drupal.org).
Use the Selection Form to select options for this code review, or change the Default Settings and use the Default tab above.
modules/upload/upload.module

upload.module

  • severity: normalLine 90: string concatenation should be formatted without a space separating the operators (dot .) and a quote
              $filename = 'system/files/' . $filename;
  • severity: normalLine 120: string concatenation should be formatted with a space separating the operators (dot .) and non-quote terms
      $exceed_max_msg = t('Your PHP settings limit the maximum file size per upload to %size.', array('%size' => format_size(file_upload_max_size()))).'<br/>';
  • severity: normalLine 213: string concatenation should be formatted with a space separating the operators (dot .) and non-quote terms
      $form['settings_general']['upload_max_size'] = array('#value' => '<p>'. t('Your PHP settings limit the maximum file size per upload to %size.', array('%size' => format_size(file_upload_max_size()))).'</p>');
  • severity: normalLine 292: Control statements should have one space between the control keyword and opening parenthesis
      if(count($_POST) == 0) {
  • severity: normalLine 320: missing space after comma
        $file->list = variable_get('upload_list_default',1);
  • severity: normalLine 787: missing space after comma
            $form['files'][$key]['list']['#value'] = variable_get('upload_list_default',1);