diff options
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r-- | ext/imap/php_imap.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 01d1a5f80c..d58e7c59ec 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3353,13 +3353,13 @@ PHP_FUNCTION(imap_bodystruct) RETURN_FALSE; } - object_init(return_value); body=mail_body(imap_le_struct->imap_stream, msg, (unsigned char*)ZSTR_VAL(section)); if (body == NULL) { - zval_ptr_dtor(return_value); RETURN_FALSE; } + + object_init(return_value); if (body->type <= TYPEMAX) { add_property_long(return_value, "type", body->type); } @@ -4074,11 +4074,8 @@ int _php_imap_mail(char *to, char *subject, char *message, char *headers, char * } fprintf(sendmail, "\n%s\n", message); ret = pclose(sendmail); - if (ret == -1) { - return 0; - } else { - return 1; - } + + return ret != -1; } else { php_error_docref(NULL, E_WARNING, "Could not execute mail delivery program"); return 0; |