mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 20:01:36 +02:00
fix for failed getBytes on a non object
This commit is contained in:
parent
c74c024a46
commit
437343bc0f
@ -2868,7 +2868,7 @@ blockquote[type=cite] {
|
|||||||
$attachment = $this->mail_bo->getAttachmentByCID($this->uid, $matches[2], $this->partID);
|
$attachment = $this->mail_bo->getAttachmentByCID($this->uid, $matches[2], $this->partID);
|
||||||
|
|
||||||
// only use data uri for "smaller" images, as otherwise the first display of the mail takes to long
|
// only use data uri for "smaller" images, as otherwise the first display of the mail takes to long
|
||||||
if ($attachment->getBytes() < 8192) // msie=8 allows max 32k data uris
|
if (($attachment instanceof Horde_Mime_Part) && $attachment->getBytes() < 8192) // msie=8 allows max 32k data uris
|
||||||
{
|
{
|
||||||
$this->mail_bo->fetchPartContents($this->uid, $attachment);
|
$this->mail_bo->fetchPartContents($this->uid, $attachment);
|
||||||
$cache[$imageURL] = 'data:'.$attachment->getType().';base64,'.base64_encode($attachment->getContents());
|
$cache[$imageURL] = 'data:'.$attachment->getType().';base64,'.base64_encode($attachment->getContents());
|
||||||
@ -2910,7 +2910,7 @@ blockquote[type=cite] {
|
|||||||
$attachment = $this->mail_bo->getAttachmentByCID($this->uid, $matches[1], $this->partID);
|
$attachment = $this->mail_bo->getAttachmentByCID($this->uid, $matches[1], $this->partID);
|
||||||
|
|
||||||
// only use data uri for "smaller" images, as otherwise the first display of the mail takes to long
|
// only use data uri for "smaller" images, as otherwise the first display of the mail takes to long
|
||||||
if (bytes($attachment->getBytes()) < 8192) // msie=8 allows max 32k data uris
|
if (($attachment instanceof Horde_Mime_Part) && bytes($attachment->getBytes()) < 8192) // msie=8 allows max 32k data uris
|
||||||
{
|
{
|
||||||
$this->mail_bo->fetchPartContents($this->uid, $attachment);
|
$this->mail_bo->fetchPartContents($this->uid, $attachment);
|
||||||
$cache[$imageURL] = 'data:'.$attachment->getType().';base64,'.base64_encode($attachment->getContents());
|
$cache[$imageURL] = 'data:'.$attachment->getType().';base64,'.base64_encode($attachment->getContents());
|
||||||
@ -2952,7 +2952,7 @@ blockquote[type=cite] {
|
|||||||
$attachment = $this->mail_bo->getAttachmentByCID($this->uid, $matches[1], $this->partID);
|
$attachment = $this->mail_bo->getAttachmentByCID($this->uid, $matches[1], $this->partID);
|
||||||
|
|
||||||
// only use data uri for "smaller" images, as otherwise the first display of the mail takes to long
|
// only use data uri for "smaller" images, as otherwise the first display of the mail takes to long
|
||||||
if ($attachment->getBytes() < 8192) // msie=8 allows max 32k data uris
|
if (($attachment instanceof Horde_Mime_Part) && $attachment->getBytes() < 8192) // msie=8 allows max 32k data uris
|
||||||
{
|
{
|
||||||
$this->mail_bo->fetchPartContents($this->uid, $attachment);
|
$this->mail_bo->fetchPartContents($this->uid, $attachment);
|
||||||
$cache[$imageURL] = 'data:'.$attachment->getType().';base64,'.base64_encode($attachment->getContents());
|
$cache[$imageURL] = 'data:'.$attachment->getType().';base64,'.base64_encode($attachment->getContents());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user