summaryrefslogtreecommitdiff
path: root/ext/imap/php_imap.c
diff options
context:
space:
mode:
authorChuck Hagenbuch <chagenbu@php.net>2000-10-17 16:11:26 +0000
committerChuck Hagenbuch <chagenbu@php.net>2000-10-17 16:11:26 +0000
commite058cb064852bc4fe1c0a36167584c96dfcf5a9d (patch)
tree0e0b7b6ea48a23e1a85e49de1c9228c029dc0e32 /ext/imap/php_imap.c
parentffbd2367e775a710a3b078ab15d0b424dc3f832d (diff)
downloadphp-git-e058cb064852bc4fe1c0a36167584c96dfcf5a9d.tar.gz
fix imap_fetchstructure(). msgindex is not valid if we're using FT_UID;
always use Z_LVAL_PP(msgno) in the actual c-client function call.
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r--ext/imap/php_imap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c
index d4da22188c..a6a4509983 100644
--- a/ext/imap/php_imap.c
+++ b/ext/imap/php_imap.c
@@ -1904,16 +1904,16 @@ PHP_FUNCTION(imap_fetchstructure)
convert_to_long_ex(flags);
}
object_init(return_value);
-
+
ind = Z_LVAL_PP(streamind);
-
+
imap_le_struct = (pils *) zend_list_find(ind, &ind_type);
-
+
if (!imap_le_struct || !IS_STREAM(ind_type)) {
php_error(E_WARNING, "Unable to find stream pointer");
RETURN_FALSE;
}
-
+
if ((myargc == 3) && (Z_LVAL_PP(flags) & FT_UID)) {
/* This should be cached; if it causes an extra RTT to the
IMAP server, then that's the price we pay for making sure
@@ -1926,8 +1926,8 @@ PHP_FUNCTION(imap_fetchstructure)
php_error(E_WARNING, "Bad message number");
RETURN_FALSE;
}
-
- mail_fetchstructure_full(imap_le_struct->imap_stream, msgindex, &body ,myargc == 3 ? Z_LVAL_PP(flags) : NIL);
+
+ mail_fetchstructure_full(imap_le_struct->imap_stream, Z_LVAL_PP(msgno), &body ,myargc == 3 ? Z_LVAL_PP(flags) : NIL);
if (!body) {
php_error(E_WARNING, "No body information available");