src/includes/classes/Core/Utils/FileUpload.php
public function errorReason(int $code): string
    {
        switch ($code) {
            case UPLOAD_ERR_INI_SIZE:
                return __('Exceeds `upload_max_filesize` directive in `php.ini`.');

            case UPLOAD_ERR_FORM_SIZE:
                return __('Exceeds `MAX_FILE_SIZE` directive in the HTML form.');

            case UPLOAD_ERR_PARTIAL:
                return __('Data missing; partial.');

            case UPLOAD_ERR_NO_FILE:
                return __('Missing file.');

            case UPLOAD_ERR_NO_TMP_DIR:
                return __('Missing temp dir.');

            case UPLOAD_ERR_CANT_WRITE:
                return __('Failed to write file to disk.');

            case UPLOAD_ERR_EXTENSION:
                return __('A PHP extension stopped the file upload.');

            default: // Unknown error code.
                return __('Unknown error.');
        }
    }
public function errorReason(int $code): string
    {
        switch ($code) {
            case UPLOAD_ERR_INI_SIZE:
                return __('Exceeds `upload_max_filesize` directive in `php.ini`.');

            case UPLOAD_ERR_FORM_SIZE:
                return __('Exceeds `MAX_FILE_SIZE` directive in the HTML form.');

            case UPLOAD_ERR_PARTIAL:
                return __('Data missing; partial.');

            case UPLOAD_ERR_NO_FILE:
                return __('Missing file.');

            case UPLOAD_ERR_NO_TMP_DIR:
                return __('Missing temp dir.');

            case UPLOAD_ERR_CANT_WRITE:
                return __('Failed to write file to disk.');

            case UPLOAD_ERR_EXTENSION:
                return __('A PHP extension stopped the file upload.');

            default: // Unknown error code.
                return __('Unknown error.');
        }
    }
Error reason.

@since 160926 Upload utils.

@param int $code An upload error code.

@return string An upload error reason.