[dev] Question with Horde_Imap_Client_Base::fetch() when UID no longer exists.

Michael J Rubinsky mrubinsk at horde.org
Sun Jan 20 00:05:39 UTC 2013


Quoting Michael M Slusarz <slusarz at horde.org>:

> Quoting Michael J Rubinsky <mrubinsk at horde.org>:
>
>> What is the expected behavior when attempting to fetch a UID that  
>> no longer exists on the server? I would have thought - and I am  
>> almost positive that this is the way it worked when I first coded  
>> the AS email code, that there would be no data returned.
>
> Yes, this was the behavior a long time ago.
>
>> Previously, $results[160571] was empty if it didn't exist on the  
>> server, now it seems to contain an Horde_Imap_Client_Data_Fetch  
>> object:
>
> This is all intentional.  There are a variety of reasons why this is  
> the case - none of which are important to review for the current  
> discussion.
>
>> var_dump($results[160571]->getStructure()->contentTypeMap());
>>
>> Results:
>> array(1) {
>>  [""]=>
>>  string(24) "application/octet-stream"
>> }
>>
>> What is the current/correct way of catching when the requested  
>> email no longer exists on the IMAP server?
>
> $results[160571]->isDefault() !== true
>
> michael

Did this change after H5 was released? If so, wouldn't this be a BC  
break since code that relied on the older way of checking for this no  
longer works? I guess it's moot at this point though since it's  
already released. Would you know at what version this changed so I can  
mark that as the minimum required version in the AS library?

-- 
mike

The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6062 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.horde.org/archives/dev/attachments/20130119/baf5ee03/attachment.bin>


More information about the dev mailing list