php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17503 imap_mail_compose disposition.type problem
Submitted: 2002-05-29 04:34 UTC Modified: 2002-05-29 04:40 UTC
From: mccohy at kyberdigi dot cz Assigned:
Status: Closed Package: IMAP related
PHP Version: 4.2.1 OS: SuSE Linux 7.2
Private report: No CVE-ID: None
 [2002-05-29 04:34 UTC] mccohy at kyberdigi dot cz
Accoring to http://www.php.net/manual/en/function.imap-mail-compose.php:
If I want to add a "Content-disposition" line to an attachment, I should do something
like this:

$part['disposition.type'] = 'attachment';
$part['disposition'] = array ('filename'=>'file.txt');

But this does not work.

So I looked in the source, file ext/imap/php_imap.c, line 2998:
if (zend_hash_find(Z_ARRVAL_PP(data), "Z_TYPE(disposition)",
    sizeof("Z_TYPE(disposition)"), (void **) &pvalue)== SUCCESS) {

... and tried a work-around:

$part['Z_TYPE(disposition)'] = 'attachment';
$part['disposition'] = array ('filename'=>'file.txt');

... which works fine.

Cound someone please repair the source or the Manual page?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-05-29 04:40 UTC] derick@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Apr 24 14:01:30 2024 UTC