php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #61178 More info needed on "$section" parameter.
Submitted: 2012-02-24 13:42 UTC Modified: 2015-06-15 11:59 UTC
From: ww dot galen at gmail dot com Assigned:
Status: Open Package: IMAP related
PHP Version: Irrelevant OS: n/a
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ww dot galen at gmail dot com
New email:
PHP Version: OS:

 

 [2012-02-24 13:42 UTC] ww dot galen at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.imap-fetchbody#refsect1-
function.imap-fetchbody-parameters
---

The description of the "$section" parameter to imap_fetchbody is woefully inadequate. At the very least, it could use links to the 
relevant parts of the IMAP standard it refers to, which (as far as I can determine) are § 6.4.5 "FETCH Command"  
(http://tools.ietf.org/html/rfc3501#section-6.4.5) and the definition of fetch-att in § 9 "Formal Syntax" 
(http://tools.ietf.org/html/rfc3501#section-9) on page 85 (http://tools.ietf.org/html/rfc3501#page-85).

A note such as the following would be helpful (though it should be checked for accuracy):

"Since PHP array indices are 0-based while section numbers are 1-based, you must add 1 to the index of any section taken from the result 
of imap_fetchstructure before using it with imap_fetchbody. For example, if $parts is the result of imap_fetchstructure, $parts[0] would 
correspond to section number "1", and $parts[2][1][0] corresponds to "3.2.1"."


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-15 11:59 UTC] cmb@php.net
-Package: Documentation problem +Package: IMAP related
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Mar 21 17:01:28 2019 UTC