6.0.0-git
2019-03-24

[#4029] fatal php error occured when first type calendar access
Summary fatal php error occured when first type calendar access
Queue Kronolith
Queue Version 2.1.1
Type Bug
State Duplicate
Priority 1. Low
Owners
Requester mzarubin (at) swsoft (dot) com
Created 2006-06-13 (4667 days ago)
Due
Updated 2006-06-13 (4667 days ago)
Assigned
Resolved 2006-06-13 (4667 days ago)
Milestone
Patch No

History
2006-06-13 09:29:09 Jan Schneider Comment #2
State ⇒ Duplicate
Reply to this comment
Already fixed in CVS.
2006-06-13 09:09:40 mzarubin (at) swsoft (dot) com Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ fatal php error occured when first type calendar access
Queue ⇒ Kronolith
Reply to this comment
When user try to access 'Calendar' in left frame next fatal error occured



Fatal error: Call to a member function on a non-object in 
/usr/share/psa-horde/kronolith/lib/Driver/sql.php on line 291



in function listEventsConditional. It called from 
/usr/share/psa-horde/kronolith/lib/Kronolith.php from

listEventsIds(). Global variable kronolith are not fully initialized, 
here are var_dump



object(kronolith_driver_sql)(5) {

   ["_params"]=>

   array(11) {

     ["persistent"]=>

     bool(false)

     ["hostspec"]=>

     string(9) "localhost"

     ["username"]=>

     string(5) "horde"

     ["socket"]=>

     string(27) "/var/run/mysqld/mysqld.sock"

     ["protocol"]=>

     string(4) "unix"

     ["database"]=>

     string(5) "horde"

     ["password"]=>

     string(13) "password"

     ["charset"]=>

     string(4) "utf8"

     ["phptype"]=>

     string(5) "mysql"

     ["table"]=>

     string(16) "kronolith_events"

     ["driverconfig"]=>

     string(5) "horde"

   }

   ["_calendar"]=>

   NULL

   ["_db"]=>

   NULL

   ["_connected"]=>

   bool(false)

   ["_cache"]=>

   array(0) {

   }



I workarounded it by call of _connect in listEventsConditional(), here 
is the patch. Feel free to adapt it to your needs.



Thaks, Michael



--- kronolith/lib/Driver/sql.php.orig   2006-06-13 05:04:06.000000000 -0400

+++ kronolith/lib/Driver/sql.php        2006-06-13 05:03:02.000000000 -0400

@@ -251,6 +251,7 @@

      function listEventsConditional($startInterval, $endInterval,

                                     $conditions = '', $vals = array())

      {

+       $this->_connect();

          $q = 'SELECT event_id, event_uid, event_description, 
event_location,' .

              ' event_status, event_attendees,' .

              ' event_keywords, event_title, event_category,' .


Saved Queries