6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
9/20/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#12827] PHP ERROR: array_intersect_key() when purging deleted items
*
Your Email Address
*
Spam protection
Enter the letters below:
.__ .__ __.. ..__ [__)[__)(__ |\/|[__) [__)| .__)| || \
Comment
> 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 > > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers