]> granicus.if.org Git - php/commitdiff
MFH
authorIlia Alshanetsky <iliaa@php.net>
Mon, 3 Feb 2003 21:24:48 +0000 (21:24 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 3 Feb 2003 21:24:48 +0000 (21:24 +0000)
ext/imap/php_imap.c

index 545b7f1f0d0d90aa38e0c3e766fd5b25155b4bb5..4e7600a76838c540007087a575d33e5df9d5470d 100644 (file)
@@ -2829,7 +2829,10 @@ PHP_FUNCTION(imap_mail_compose)
        }
 
        zend_hash_internal_pointer_reset(Z_ARRVAL_PP(body));
-       zend_hash_get_current_data(Z_ARRVAL_PP(body), (void **) &data);
+       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");
+               RETURN_FALSE;
+       }
        zend_hash_get_current_key(Z_ARRVAL_PP(body), &key, &ind, 0); /* FIXME: is this necessary?  we're not using key/ind */
 
        if (Z_TYPE_PP(data) == IS_ARRAY) {