[dev] static context of MIME_Viewer::getDriver()

Philip Iezzi horde at iezzi.ch
Sat Mar 6 09:00:12 PST 2004


hi

I'm testing Chora from CVS HEAD (with current framework from HEAD) under PHP
5.0.0b4.
Chora doesn't display any files, all I see is the directories of the modules
with their subdirectories.

-------------------
Fatal error: Using $this when not in object context in
/usr/share/php/Horde/MIME/Viewer.php on line 250
-------------------

In MIME_Viewer::getDriver() the keyword $this-> is used but we are not in a
object context. This function did get called in a statical context. Here's
my trace:

/chora/cvs.php, line 96:

        $icon = MIME_Viewer::getIcon($mimeType);

/framework/MIME/MIME/Viewer.php, line 340:

        $ob = MIME_Viewer::_getIcon($mimeType, $app);

/framework/MIME/MIME/Viewer.php, line 375:

        $ob = MIME_Viewer::getDriver($mimeType, $module);

/framework/MIME/MIME/Viewer.php, line 250:

        if (isset($this->_driverCache[$cacheName])) {
                  ^^^^^^^


Has Chora been tested on PHP 5? Would be great if someone could fix this and
any other issues with PHP 5 (I haven't found any other so far...)

thanks
Philip



More information about the dev mailing list