Admidio/admidio

View on GitHub
adm_program/modules/messages/messages_send.php

Summary

Maintainability
A
2 hrs
Test Coverage

Avoid deeply nested control flow statements.
Open

                                if(!FileSystemUtils::allowedFileExtension($_FILES['userfile']['name'][$currentAttachmentNo])) {
                                    throw new Exception('SYS_FILE_EXTENSION_INVALID');
                                }
Severity: Major
Found in adm_program/modules/messages/messages_send.php - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                                    if ($attachmentSize > Email::getMaxAttachmentSize()) {
                                        throw new Exception('SYS_ATTACHMENT_TO_LARGE');
                                    }
    Severity: Major
    Found in adm_program/modules/messages/messages_send.php - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                                      if (strlen($_FILES['userfile']['type'][$currentAttachmentNo]) <= 0) {
                                          $_FILES['userfile']['type'][$currentAttachmentNo] = 'application/octet-stream';
                                      }
      Severity: Major
      Found in adm_program/modules/messages/messages_send.php - About 45 mins to fix

        There are no issues that match your filters.

        Category
        Status