[kronolith] What is wrong with my question? Fatal Error: Kronolith

Eric Rostetter eric.rostetter at physics.utexas.edu
Mon Feb 17 23:48:59 PST 2003


Quoting "\"Markus K. Schäffauer\"" <Markus.K.Schaeffauer at gmx.de>:

> Fatal error: Call to a member function on a non-object in
> /opt/lampp/htdocs/horde/kronolith/lib/base.php on line 71

Lines 70 and 71 read:

$GLOBALS['calendar'] = &Kronolith_Driver::factory($conf['calendar']['driver'],
$conf['calendar']['params']);
$GLOBALS['calendar']->open(Auth::getAuth());

So, it is failing in the second line.  The most reasonable reason for the
failure is that the first line failed for some reason. Unfortunately,
no check was made for the success or failure of the factory() call...

Even in CVS HEAD we don't seem to check the return value...  I'm not
expert, but this seems like a problem.  I would think we should make
some check, and report an error if the factory() call fails...

You might try changing the above to something like:

$GLOBALS['calendar'] = &Kronolith_Driver::factory($conf['calendar']['driver'],
$conf['calendar']['params']);
if ($GLOBALS['calendar'] === false) {
   Horde::fatal(new PEAR_Error(_("Couldn't create calendar instance")),
          __FILE__, __LINE__);
}
$GLOBALS['calendar']->open(Auth::getAuth());

That should tell you if the factory() call is failing or not.

> As some of you suggest in the news, it seems to be a problem of the
> config.php
> of Kronolith, but I can not find anything wrong

Try this, if you have a stand-alone php command: php -l conf.php
and see if it reports any problems  with the file's syntax.

> - and I am still getting the
> error message after login and when clicking on "Horde" or on "Kronolith".

Yes, no doubt as Horde does a kronolith api call.

-- 
Eric Rostetter
The Department of Physics
The University of Texas at Austin

Why get even? Get odd!


More information about the kronolith mailing list