[horde] Call to undefined method Horde_Core_Factory_MimeViewer::getViewer()

Jan Schneider jan at horde.org
Mon Aug 18 15:33:18 UTC 2014


Zitat von Nagy, Attila <bra at fsn.hu>:

> Hi,
>
> I often get this error from Horde (on specific e-mails it seems):
> PHP Fatal error:  Call to undefined method  
> Horde_Core_Factory_MimeViewer::getViewer() in  
> /usr/local/share/pear/Horde/Core/Factory/MimeViewer.php on line 171
>
> line 171 is:
>         return $this->getViewer($mime, array('type' => $type));
>
> $this is: Horde_Core_Factory_MimeViewer Object
>
> With a quick grep on the system, I can't see getViewer defined anywhere.
>
> From a git log of the above file, I see this:
> diff --git a/framework/Core/lib/Horde/Core/Factory/MimeViewer.php  
> b/framework/Co
> re/lib/Horde/Core/Factory/MimeViewer.php
> index a8d6dc1..6b270fe 100644
> --- a/framework/Core/lib/Horde/Core/Factory/MimeViewer.php
> +++ b/framework/Core/lib/Horde/Core/Factory/MimeViewer.php
> @@ -67,7 +67,7 @@ class Horde_Core_Factory_MimeViewer
>       * @return Horde_Mime_Viewer_Base  The newly created instance.
>       * @throws Horde_Mime_Viewer_Exception
>       */
> -    public function getViewer(Horde_Mime_Part $mime, array $opts = array())
> +    public function create(Horde_Mime_Part $mime, array $opts = array())
>
> However if I change $this->getViewer to $this->create, I get the  
> following error:
> PHP Fatal error:  Call to a member function getMIMEPart() on a  
> non-object in /usr/local/www/webmail/web/imp/lib/Mime/Viewer/Mdn.php  
> on line 84
>
> (and indeed, the given mail is a read receipt)
>
> If I return false from getViewerCallback, the message is displayed.
>
> I have
> $mime_drivers['html']['inline'] = true;
> set if that counts, otherwise I can't see any non-default settings here.
>
> Any ideas on this?

Please create a bug ticket.

-- 
Jan Schneider
The Horde Project
http://www.horde.org/
https://www.facebook.com/hordeproject



More information about the horde mailing list