some fixes for warnings during phpUnit about session+translation

This commit is contained in:
Ralf Becker 2020-03-04 20:28:30 +01:00
parent c85f1f3d05
commit df263c22a3
2 changed files with 7 additions and 1 deletions

View File

@ -1658,6 +1658,8 @@ class Session
*/
private static function set_cookiedomain()
{
if (PHP_SAPI === "cli") return; // gives warnings and has no benefit
if ($GLOBALS['egw_info']['server']['cookiedomain'])
{
// Admin set domain, eg. .domain.com to allow egw.domain.com and www.domain.com

View File

@ -395,7 +395,11 @@ class Translation
static function &load_app($app,$lang)
{
//$start = microtime(true);
if (is_null(self::$db)) self::init(false);
if (!isset(self::$db))
{
self::init(false);
if (!isset(self::$db)) return;
}
$loaded = array();
foreach(self::$db->select(self::LANG_TABLE,'message_id,content',array(
'lang' => $lang,