diff --git a/phpgwapi/inc/class.config.inc.php b/phpgwapi/inc/class.config.inc.php index 7caac0d73a..5507721d1d 100755 --- a/phpgwapi/inc/class.config.inc.php +++ b/phpgwapi/inc/class.config.inc.php @@ -35,7 +35,7 @@ $appname = $GLOBALS['phpgw_info']['flags']['currentapp']; } - $this->db = $GLOBALS['phpgw']->db; + $this->db = is_object($GLOBALS['phpgw']->db) ? $GLOBALS['phpgw']->db : $GLOBALS['phpgw_setup']->db; $this->appname = $appname; }