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

Gmail Issue - Undefined property: stdClass::$subject #21

Closed
int3rlop3r opened this issue Aug 4, 2013 · 2 comments
Closed

Gmail Issue - Undefined property: stdClass::$subject #21

int3rlop3r opened this issue Aug 4, 2013 · 2 comments

Comments

@int3rlop3r
Copy link

I get the following Notice while connecting to a gmail server using the Sample Usage code in the readme section -

PHP Notice:  Undefined property: stdClass::$subject in /home/int3rlop3r/Programs/php/git_projects/Fetch/src/Fetch/Message.php on line 193
PHP Stack trace:
PHP   1. {main}() /home/int3rlop3r/Programs/php/git_projects/Fetch/test.php:0
PHP   2. Fetch\Server->getMessages() /home/int3rlop3r/Programs/php/git_projects/Fetch/test.php:8
PHP   3. Fetch\Message->__construct() /home/int3rlop3r/Programs/php/git_projects/Fetch/src/Fetch/Server.php:362
PHP   4. Fetch\Message->loadMessage() /home/int3rlop3r/Programs/php/git_projects/Fetch/src/Fetch/Message.php:178
@QuingKhaos
Copy link
Contributor

imap_fetch_overview is used to retrieve the overview informations of the message. Quoted from the documentation:

Returns an array of objects describing one message header each. The object will only define a property if it exists.

Means your message has no subject. Uncommon but possible. A isset check, before asking for property of the returned stdClass and assigning null to the Message class properties should fit.

@int3rlop3r
Copy link
Author

Sorry my bad. I posted the issue without examining it thoroughly. Will make the appropriate changes.

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

3 participants