[PHP-DEV] Bug #13374 Updated: imap_fetchstructure() does not return $struct-type for text types

2001-09-20 Thread rfinnie

ID: 13374
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Closed
Bug Type: IMAP related
Operating System: FreeBSD 4.3
PHP Version: 4.0CVS-2001-09-21
New Comment:

hmm, don't know how this got duplicated.

Previous Comments:


[2001-09-21 07:51:57] [EMAIL PROTECTED]

Bug 2181 is marked closed, but last comment indicates it should be re-opened (sorry, 
I'm not the opener of 2181).  This would be what $struct-type would normally be used 
for:

$types = array(
  0 = TEXT,
  1 = MULTIPART,  
  2 = MESSAGE,
  3 = APPLICATION,
  4 = AUDIO,
  5 = IMAGE,
  6 = VIDEO,
  7 = OTHER
);
if($struct-type) {
  $type = $types[$struct-type];
} else {
  $type = UNKNOWN;
}

$struct-type will always evaluate as false, but you can see from serializing the 
struct object that the type isn't being set at all.  This probably should be fixed 
either way.

On the other hand, can we always assume that if $struct-type is false/null/whatever, 
it is a text part?





Edit this bug report at http://bugs.php.net/?id=13374edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #13374 Updated: imap_fetchstructure() does not return $struct-type for text types

2001-09-20 Thread hholzgra

ID: 13374
Updated by: hholzgra
Reported By: [EMAIL PROTECTED]
Old Status: Closed
Status: Bogus
Bug Type: IMAP related
Operating System: FreeBSD 4.3
PHP Version: 4.0CVS-2001-09-21


Previous Comments:


[2001-09-21 07:51:57] [EMAIL PROTECTED]

Bug 2181 is marked closed, but last comment indicates it should be re-opened (sorry, 
I'm not the opener of 2181).  This would be what $struct-type would normally be used 
for:

$types = array(
  0 = TEXT,
  1 = MULTIPART,  
  2 = MESSAGE,
  3 = APPLICATION,
  4 = AUDIO,
  5 = IMAGE,
  6 = VIDEO,
  7 = OTHER
);
if($struct-type) {
  $type = $types[$struct-type];
} else {
  $type = UNKNOWN;
}

$struct-type will always evaluate as false, but you can see from serializing the 
struct object that the type isn't being set at all.  This probably should be fixed 
either way.

On the other hand, can we always assume that if $struct-type is false/null/whatever, 
it is a text part?





Edit this bug report at http://bugs.php.net/?id=13374edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]