[Tickets #12827] Re: PHP ERROR: array_intersect_key() when purging deleted items
noreply at bugs.horde.org
noreply at bugs.horde.org
Wed Nov 20 18:48:36 UTC 2013
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/12827
------------------------------------------------------------------------------
Ticket | 12827
Updated By | aria at bsc.gwu.edu
Summary | PHP ERROR: array_intersect_key() when purging deleted
| items
Queue | IMP
Version | 6.1.5
Type | Bug
State | Feedback
Priority | 1. Low
Milestone |
Patch |
Owners |
+New Attachment | debug-login.txt
------------------------------------------------------------------------------
aria at bsc.gwu.edu (2013-11-20 18:48) wrote:
I apologize in advance if this is rather convoluted or not what you
wanted but I have no understanding of PHP and am not a software
developer.
Here is a summary of what I did.
0-setup the PEAR/Horde/Imap/Client/Cache/Backend/Cache.php file with
the debug statements (see below).
1-Cleared the cache backend (file system)
2-sent two messages to a test user with an empty inbox
3-login as the test user and display the inbox resulting in a debug
file being generated. See attachment debug-login.txt
4-marked messages for deletion and click purge deleted. See
attachment debug-purge.txt
To setup the debug, I changed two functions in the Cache.php file as follows:
public function deleteMsgs($mailbox, $uids)
{
$dmsg = "deleteMsgs-ENTRY";
Horde::debug($dmsg);
Horde::debug($this->_slicemap);
$slicemap = &$this->_slicemap[$mailbox];
$dmsg = "deleteMsgs-POINT-1";
Horde::debug($dmsg);
Horde::debug($this->_slicemap);
$deleted = array_intersect_key($slicemap['s'], array_flip($uids));
(snip)
And further down:
protected function _loadSliceMap($mailbox, $uidvalid = null)
{
$dmsg = "_loadSliceMap-TOP";
Horde::debug($dmsg);
Horde::debug($this->_slicemap);
if (!isset($this->_slicemap[$mailbox]) &&
(($data = $this->_cache->get($this->_getCid($mailbox,
'slicemap'), 0)) !== false) &&
($slice = @unserialize($data)) &&
is_array($slice)) {
$this->_slicemap[$mailbox] = $slice;
}
$dmsg = "_loadSliceMap-AFTER-IF-1";
Horde::debug($dmsg);
Horde::debug($this->_slicemap);
if (isset($this->_slicemap[$mailbox])) {
$ptr = &$this->_slicemap[$mailbox];
if (is_null($ptr['d']['uidvalid'])) {
$ptr['d']['uidvalid'] = $uidvalid;
$dmsg = "_loadSliceMap-RETURN-1";
Horde::debug($dmsg);
Horde::debug($this->_slicemap);
return;
} elseif (!is_null($uidvalid) &&
($ptr['d']['uidvalid'] != $uidvalid)) {
$this->_deleteMailbox($mailbox);
} else {
$dmsg = "_loadSliceMap-RETURN-2";
Horde::debug($dmsg);
Horde::debug($this->_slicemap);
return;
}
}
$dmsg = "_loadSliceMap-AFTER-IF-2";
Horde::debug($dmsg);
Horde::debug($this->_slicemap);
$this->_slicemap[$mailbox] = array(
// Tracking count for purposes of determining slices
'c' => 0,
// Metadata storage
// By default includes UIDVALIDITY of mailbox.
'd' => array('uidvalid' => $uidvalid),
// The ID of the last slice.
'i' => 0,
// The slice list.
's' => array()
);
$dmsg = "_loadSliceMap-END";
Horde::debug($dmsg);
Horde::debug($this->_slicemap);
}
It appears that when you click purge deleted, the function
loadslicemap is not called at all.
Something tells me this is not going to be useful. If not, please let
me know what to change or send me a php code that has the debug
statements you need and I will use that.
Thanks,
Aria
aria at bsc.gwu.edu (2013-11-20 18:48) uploaded: debug-login.txt
http://bugs.horde.org/h/services/download/?app=whups&actionID=download_file&file=debug-login.txt&ticket=12827&fn=%2Fdebug-login.txt
More information about the bugs
mailing list