[Tickets #12999] Re: PHP warning in basic view

noreply at bugs.horde.org noreply at bugs.horde.org
Fri Feb 28 08:39:58 UTC 2014


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/12999
------------------------------------------------------------------------------
  Ticket             | 12999
  Updated By         | Thomas Jarosch <thomas.jarosch at intra2net.com>
  Summary            | PHP warning in basic view
  Queue              | IMP
  Version            | Git master
  Type               | Bug
  State              | Resolved
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             | Michael Slusarz
------------------------------------------------------------------------------


Thomas Jarosch <thomas.jarosch at intra2net.com> (2014-02-28 08:39) wrote:

I've modified the code to show some more debug information:

---git diff---------------------------------------------
diff --git a/imp/lib/Mailbox/SessionCache.php  
b/imp/lib/Mailbox/SessionCache.php
index eb5466b..fa855af 100644
--- a/imp/lib/Mailbox/SessionCache.php
+++ b/imp/lib/Mailbox/SessionCache.php
@@ -81,6 +81,18 @@ class IMP_Mailbox_SessionCache implements Serializable
       */
      public function getAcl($mbox)
      {
+        if (is_null($this->_cache)) {
+            $e = new Exception();
+            Horde::log("TOMJ: null cache");
+            Horde::log($e->getTraceAsString(), 'INFO');
+        }
+        else if (is_null($this->_cache[$mbox])) {
+            $e = new Exception();
+            Horde::log("TOMJ: Dumping invalid cache entry");
+            Horde::log(print_r($this->_cache, true));
+            Horde::log($e->getTraceAsString(), 'INFO');
+        }
+
          if (!array_key_exists(self::CACHE_ACL, $this->_cache[$mbox])) {
              return false;
          }
------------------------------------------------

Here's the output:

------------------------------------
2014-02-28T09:36:30+01:00 INFO: HORDE [imp] TOMJ: Dumping invalid  
cache entry [pid 3913 on line 91 of  
"/datastore/DEVEL/horde/imp/lib/Mailbox/SessionCache.php"]
2014-02-28T09:36:30+01:00 INFO: HORDE [imp] Array
(
)
  [pid 3913 on line 92 of  
"/datastore/DEVEL/horde/imp/lib/Mailbox/SessionCache.php"]
2014-02-28T09:36:30+01:00 INFO: HORDE [imp] #0  
/datastore/DEVEL/horde/imp/lib/Mailbox.php(326):  
IMP_Mailbox_SessionCache->getAcl('INBOX')
#1 /datastore/DEVEL/horde/imp/lib/Mailbox.php(566): IMP_Mailbox->__get('acl')
#2 /datastore/DEVEL/horde/imp/lib/Basic/Mailbox.php(74):  
IMP_Mailbox->__get('readonly')
#3 /datastore/DEVEL/horde/imp/lib/Basic/Base.php(69):  
IMP_Basic_Mailbox->_init()
#4 /datastore/DEVEL/horde/imp/basic.php(34):  
IMP_Basic_Base->__construct(Object(Horde_Variables))
#5 {main} [pid 3913 on line 93 of  
"/datastore/DEVEL/horde/imp/lib/Mailbox/SessionCache.php"]
2014-02-28T09:36:30+01:00 WARN: HORDE [imp] PHP ERROR:  
array_key_exists() expects parameter 2 to be array, null given [pid  
3913 on line 96 of  
"/datastore/DEVEL/horde/imp/lib/Mailbox/SessionCache.php"]
------------------------------------

-> $this->_cache is still empty at the point of the call.







More information about the bugs mailing list