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

Prevent returning undefined variable #76

Closed
wants to merge 1 commit into from
Closed

Prevent returning undefined variable #76

wants to merge 1 commit into from

Conversation

robbinjanssen
Copy link
Contributor

What does it do?

The $data variable might be undefined outside if this if, only return it when it has been defined.

The $data variable might not be set, this commit makes sure it is only returned when set.
@derickr
Copy link
Member

derickr commented Jan 8, 2020

I'll have a better look soon, but how did you managed to find this? Is there a chance of a test case? ;-)

@robbinjanssen
Copy link
Contributor Author

Hi Derick, unfortunately not, but looking at the code it's clear that the variable actually can be undefined, but is still returned :)

I did however get the error in my log a couple of times:
Undefined variable: data in [vendors/zetacomponents/mail/src/transports/imap/imap_set.php, line 225]

I think it might have something to do with an (unexpected) connection error, but i'd have to dive into the imap server's logs.

derickr added a commit that referenced this pull request Jan 11, 2020
@derickr
Copy link
Member

derickr commented Jan 11, 2020

Thanks! I've merged this.

@derickr derickr closed this Jan 11, 2020
@robbinjanssen robbinjanssen deleted the patch-1 branch January 13, 2020 12:45
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

Successfully merging this pull request may close these issues.

None yet

2 participants