Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calling "getMessageTextWithUid" at InboundEmail.php with null identifier gor $structure => fatal runtime error at IMAP E-Mail Import #10509

Open
rsteinig opened this issue Aug 26, 2024 · 0 comments
Labels
Area: Emails Issues & PRs related to all things regarding emails & email module Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Severity: Moderate Key function failed, but no or little impact Type: Bug Bugs within the core SuiteCRM codebase

Comments

@rsteinig
Copy link

rsteinig commented Aug 26, 2024

Issue InboundEmail.php

if (!empty($contentType) && strtolower($contentType) === 'text/plain') {
                $email->description = $this->getMessageTextWithUid(
                    $uid,
                    $contentType,
                    $structure = null,
                    $fullHeader = null,
                    true
                );
            }

            $email->description_html = $this->getMessageTextWithUid(
                $uid,
                $structure->subtype,
                $structure,
                $fullHeader,
                $clean_email
            );

Possible Fix

if (!empty($contentType) && strtolower($contentType) === 'text/plain') {
                $email->description = $this->getMessageTextWithUid(
                    $uid,
                    $contentType,
                    $structure = null,
                    $fullHeader = null,
                    true
                );
            }

            $email->description_html = $this->getMessageTextWithUid(
                $uid,
                $contentType,
                $structure,
                $fullHeader,
                $clean_email
            );

Steps to Reproduce the Issue

Go to Inbound E-Mails and import to any related record. This will lead into a runtime error, because the given content is null. I used IMAP import and OFFICE365

Context

No response

Version

7.14.5

What browser are you currently using?

Chrome

Browser Version

No response

Environment Information

PHP 7.4

Operating System and Version

Ubuntu 22.04

@rsteinig rsteinig added the Type: Bug Bugs within the core SuiteCRM codebase label Aug 26, 2024
@rsteinig rsteinig changed the title calling "getMessageTextWithUid" with null identifier gor $structure => fatal runtime error at IMAP E-Mail Import calling "getMessageTextWithUid" at InboundEmail.php with null identifier gor $structure => fatal runtime error at IMAP E-Mail Import Aug 26, 2024
@salesagility salesagility deleted a comment Aug 26, 2024
@salesagility salesagility deleted a comment Aug 26, 2024
@johnM2401 johnM2401 added Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Area: Emails Issues & PRs related to all things regarding emails & email module Severity: Moderate Key function failed, but no or little impact labels Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Emails Issues & PRs related to all things regarding emails & email module Priority:Important Issues & PRs that are important; broken functions, errors - there are workarounds Severity: Moderate Key function failed, but no or little impact Type: Bug Bugs within the core SuiteCRM codebase
Projects
None yet
Development

No branches or pull requests

2 participants