summaryrefslogtreecommitdiff
path: root/ext/imap
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2008-04-08 00:03:34 +0000
committerIlia Alshanetsky <iliaa@php.net>2008-04-08 00:03:34 +0000
commitb6151800219387de632ebeb371b4d8a624b6cb6e (patch)
tree699eb52a5e8957ac632f33af894c8c17416129dc /ext/imap
parent7a4f2f9a00fda39418271cfe9dac3804eec85089 (diff)
downloadphp-git-b6151800219387de632ebeb371b4d8a624b6cb6e.tar.gz
MFB: various bug fixes
Diffstat (limited to 'ext/imap')
-rw-r--r--ext/imap/php_imap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index 9fe4f4cbd9..a67e78b887 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -3041,8 +3041,8 @@ PHP_FUNCTION(imap_mail_compose)
}
zend_hash_internal_pointer_reset(Z_ARRVAL_PP(body));
- if (zend_hash_get_current_data(Z_ARRVAL_PP(body), (void **) &data) != SUCCESS) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "body parameter cannot be empty");
+ if (zend_hash_get_current_data(Z_ARRVAL_PP(body), (void **) &data) != SUCCESS || Z_TYPE_PP(data) != IS_ARRAY) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "body parameter must be a non-empty array");
RETURN_FALSE;
}