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

[BUG] Empty section subtype value in IncomingMessage::getBody() causes bad, uncatchable error. #225

Open
giuspe opened this issue Jul 30, 2018 · 1 comment

Comments

@giuspe
Copy link

giuspe commented Jul 30, 2018

Bug
See here:

if (!isset($objNew->$subtype)) {

image

While parsing message body it can happen (happened to me :) that the (parsed) section subtype is empty, resulting in a bad (uncatchable) error in the following lines (all the

$objNew->$subtype

calls are bound to fail badly).

A first workaround would be at least check for empty $subtype, and exclude the whole following section if is actually empty

image

(I have the fixed branch in my local system, I'll try to push + pull request in a few hours).

@mattparksjr
Copy link
Collaborator

mattparksjr commented Jul 30, 2018 via email

viacoding1 added a commit to viacoding1/php-imap-client that referenced this issue Jan 28, 2019
mattparksjr added a commit that referenced this issue May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants