| Summary | Strange behaviour when 'forward' a multipart mail with VFSsql (Oracle) |
| Queue | IMP |
| Queue Version | HEAD |
| Type | Bug |
| State | Resolved |
| Priority | 2. Medium |
| Owners | Horde Developers (at) |
| Requester | scalero (at) datadec (dot) es |
| Created | 07/13/2004 (7808 days ago) |
| Due | |
| Updated | 12/07/2004 (7661 days ago) |
| Assigned | 07/13/2004 (7808 days ago) |
| Resolved | 12/07/2004 (7661 days ago) |
| Github Issue Link | |
| Github Pull Request | |
| Milestone | |
| Patch | No |
State ⇒ Resolved
Priority ⇒ 2. Medium
Assigned to
/**
* Stores the attachment data in its correct location.
*
* @access private
*
* @param object MIME_Part &$part The MIME_Part of the attachment.
* @param string $data Either the filename of the
* attachment or, if $vfs_file is
* false, the attachment data.
* @param optional boolean $vfs_file If using VFS, is $data a filename?
*/
function _storeAttachment(&$part, $data, $vfs_file = true)
{
global $conf;
+ // Not add attachment if $data is empty
+ if (empty($data)) {
+ return PEAR::raiseError('No data provided');
+ }
/* Store in VFS. */
if ($conf['compose']['use_vfs']) {
State ⇒ Unconfirmed
Priority ⇒ 2. Medium
Type ⇒ Bug
Queue ⇒ IMP
When I press 'forward' to a message with this MIME structure:
0. multipart/mixed
1.- multipart/alternative
1.1.- text/plain
1.2.- text/html
2.- application/pdf
3.- application/pdf
In the compose window(VFS with SQL driver) appears 3 attachments, 2 pdf's
and one 'application/octet-stream' with 0 bytes(the fisrt), if I change to
VFS file driver only shows the 2 pdf's(OK!).
The multipart/alternative part has "" in '$_contents", the difference is VFS
file driver returns PEAR_Error when function 'writeData' write 0 bytes in
'$data', but it creates a file with o bytes in vfsroot. On the other
hand VFS SQL driver not return errors(appear a warnnig
in apache error_log) and add the 0 bytes part to '_cache[]' in the function
'_storeAttachment' in horde/imp/lib/Compose.php.
Is this a VFS or Compose error? It has sense add a 0 bytes "file" in
SQL/file VFS?