mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
fix PHP error: Call to a member function contentTypeMap() on null
This commit is contained in:
parent
7a4811213b
commit
8daf1f43f7
@ -6092,7 +6092,7 @@ class Mail
|
|||||||
* @param string $_part
|
* @param string $_part
|
||||||
* @param boolean $_stream = null null do NOT fetch content, use fetchPartContents later
|
* @param boolean $_stream = null null do NOT fetch content, use fetchPartContents later
|
||||||
* true:
|
* true:
|
||||||
* @return Horde_Mime_Part
|
* @return Horde_Mime_Part|false false on error / not found
|
||||||
*/
|
*/
|
||||||
function getAttachmentByCID($_uid, $_cid, $_part, $_stream=null)
|
function getAttachmentByCID($_uid, $_cid, $_part, $_stream=null)
|
||||||
{
|
{
|
||||||
@ -6106,6 +6106,8 @@ class Mail
|
|||||||
{
|
{
|
||||||
$structure = $this->getStructure($uid=$_uid, $part=$_part);
|
$structure = $this->getStructure($uid=$_uid, $part=$_part);
|
||||||
}
|
}
|
||||||
|
if (!$structure) return false;
|
||||||
|
|
||||||
/** @var Horde_Mime_Part */
|
/** @var Horde_Mime_Part */
|
||||||
$attachment = null;
|
$attachment = null;
|
||||||
foreach($structure->contentTypeMap() as $mime_id => $mime_type)
|
foreach($structure->contentTypeMap() as $mime_id => $mime_type)
|
||||||
|
Loading…
Reference in New Issue
Block a user