improve check $GLOBALS[egw] is correctly initilized

This commit is contained in:
Ralf Becker 2017-10-18 09:09:41 +02:00
parent cd49f6568d
commit 1d7fb9fe90

View File

@ -150,7 +150,7 @@ abstract class LoggedInTest extends TestCase
require_once realpath(__DIR__.'/../loader/common.php'); // autoloader & check_load_extension require_once realpath(__DIR__.'/../loader/common.php'); // autoloader & check_load_extension
// egw is normally created when a file is loaded using require_once // egw is normally created when a file is loaded using require_once
if(!$GLOBALS['egw']) if(empty($GLOBALS['egw']) || !is_a($GLOBALS['egw'], 'EGroupware\Api\Egw\Base'))
{ {
// From Api/src/loader.php // From Api/src/loader.php
$GLOBALS['egw_info']['user']['domain'] = Api\Session::search_instance( $GLOBALS['egw_info']['user']['domain'] = Api\Session::search_instance(