php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13374 imap_fetchstructure() does not return $struct->type for text types
Submitted: 2001-09-21 07:51 UTC Modified: 2001-09-21 08:22 UTC
From: rfinnie at kefta dot com Assigned:
Status: Not a bug Package: IMAP related
PHP Version: 4.0CVS-2001-09-21 OS: FreeBSD 4.3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rfinnie at kefta dot com
New email:
PHP Version: OS:

 

 [2001-09-21 07:51 UTC] rfinnie at kefta dot com
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?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-09-21 07:55 UTC] rfinnie at kefta dot com
hmm, don't know how this got duplicated.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 16:01:28 2024 UTC