Re: Error in Cmd=GetAttachment

Jens-Uwe Mozdzen <[email protected]>
Newsgroups gmane.comp.horde.sync
Message-ID <[email protected]>
Hi Mike,

Zitat von Michael J Rubinsky <[email protected]>:
> Quoting Michael J Rubinsky <[email protected]>:
>
>> Not sure why your getting the PHP error though, it should be  
>> throwing an exception - which is what triggers the 500 response to  
>> be sent.
>
> The PHP error was due to the way I was handling detecting a missing  
> message. This should now also be fixed in the latest package release.

I upgraded to the latest PEAR code (Horde_ActiveSync 2.1.3) and tried  
to access an attachment of a deleted message:

PHP Fatal error:  Function name must be a string in  
/usr/share/php5/PEAR/Horde/ActiveSync/Imap/Adapter.php on line 569

As I have an unrelated local mod in that file, here's the  
corresponding part of the source:

  564     public function getAttachment($mailbox, $uid, $part)
  565     {
  566         $imap = $this->_getImapOb();
  567         $mbox = new Horde_Imap_Client_Mailbox($mailbox);
  568         $messages = $this->_getMailMessages($mbox, array($uid));
  569         if (!$messages[$uid](Horde_Imap_Client::FETCH_STRUCTURE)) {
  570             throw new Horde_ActiveSync_Exception('Message Gone');
  571         }
  572         $msg = new Horde_ActiveSync_Imap_Message($imap, $mbox,  
$messages[$uid]);
  573         $part = $msg->getMimePart($part);
  574
  575         return $part;
  576     }

Maybe you used some code only available in git yet?

With regards,
Jens
-- 
Jens-U. Mozdzen                         voice   : +49-40-559 51 75
NDE Netzdesign und -entwicklung AG      fax     : +49-40-559 51 77
Postfach 61 03 15                       mobile  : +49-179-4 98 21 98
D-22423 Hamburg                         e-mail  : [email protected]

         Vorsitzende des Aufsichtsrates: Angelika Mozdzen
           Sitz und Registergericht: Hamburg, HRB 90934
                   Vorstand: Jens-U. Mozdzen
                    USt-IdNr. DE 814 013 983

-- 
sync mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.