Re: [PHP-DEV] Bug #2627: copy/paste bug in imap_fetchstructure ? From: Rasmus Lerdorf (rasmus <email protected>)
Date: 10/29/99

This does look like a typo to me. Why did you think you were wrong?

On Thu, 28 Oct 1999 hholzgra <email protected> wrote:

> From: hholzgra <email protected>
> Operating system:
> PHP version: 3.0 Latest CVS (28/10/1999)
> PHP Bug Type: IMAP related
> Bug description: copy/paste bug in imap_fetchstructure ?
>
> imap_fetchstructure does not return the right value
> in id when ifid is true
>
> id is set to the value of 'description' instead of 'id'
>
> ( looks like a copy/paste bug )
>
> this bug is still present in both php3 und php4 cvs
>
> my patch for php3:
>
> -----8<-------------------------------------------------
> > cvs diff imap.c
> Index: imap.c
> ======================================
> RCS file: /repository/php3/functions/imap.c,v
> retrieving revision 1.68
> diff -u -r1.68 imap.c
> --- imap.c 1999/08/19 17:01:42 1.68
> +++ imap.c 1999/10/28 11:09:36
> @@ -2729,7 +2729,7 @@
> }
> if ( body->id ){
> add_property_long( return_value, "ifid", 1 );
> - if(body->description) add_property_string( return_value, "id", body->description, 1 );
> + if(body->description) add_property_string( return_value, "id", body->id, 1 );
> } else {
> add_property_long( return_value, "ifid", 0 );
> }
>
>
> ------------------------------------------------->8-----
>
>
> and for php4:
>
> -----8<-------------------------------------------------
> > cvs diff ext/imap/imap.c
> Index: ext/imap/imap.c
> ==============================================
> RCS file: /repository/php4/ext/imap/imap.c,v
> retrieving revision 1.15
> diff -u -r1.15 imap.c
> --- ext/imap/imap.c 1999/09/29 21:18:35 1.15
> +++ ext/imap/imap.c 1999/10/28 11:07:32
> @@ -2203,7 +2203,7 @@
> }
> if ( body->id ){
> add_property_long( return_value, "ifid", 1 );
> - if(body->description) add_property_string( return_value, "id", body->description, 1 );
> + if(body->description) add_property_string( return_value, "id", body->id, 1 );
> } else {
> add_property_long( return_value, "ifid", 0 );
> }
>
> --------------------------->8-----
>
>
>

-Rasmus

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>