From 7283d33a93b750de80b8a0b742a52d4709dff206 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 5 Mar 2020 11:53:26 +0100 Subject: [PATCH] fold Apache error.log and ignored PHP syntax errors, plus remove some warnings --- .travis.yml | 4 +++- api/src/Session.php | 1 + api/src/Vfs/Sharing.php | 3 +-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 88de27eb3a..c9af814a53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -72,9 +72,11 @@ script: # Ubuntu has problems with #!/usr/bin/env php -dapc.enable=1, it stalls forever - vendor/bin/phpunit -c doc -dapc.enable_cli=1 # output Apache error.log to diagnose PHP errors in requests send by unit-tests + - echo "travis_fold:start:SCRIPT folding starts" - sudo cat /var/log/apache2/error.log # do not run syntax check for hhvm, as it always fails / get terminated after 10m - - test $(phpenv version-name) = 'hhvm' || ./doc/php_syntax_check.sh + - ./doc/php_syntax_check.sh + - echo "travis_fold:start:SCRIPT folding ends" cache: directories: diff --git a/api/src/Session.php b/api/src/Session.php index 8e7b77ada6..d49e7c4eb7 100644 --- a/api/src/Session.php +++ b/api/src/Session.php @@ -1976,6 +1976,7 @@ class Session case PHP_SESSION_DISABLED: throw new \ErrorException('EGroupware requires PHP session extension!'); case PHP_SESSION_NONE: + if (headers_sent()) return false; // only gives warnings ini_set('session.use_cookies',0); // disable the automatic use of cookies, as it uses the path / by default session_name(self::EGW_SESSION_NAME); if (($sessionid = self::get_sessionid())) diff --git a/api/src/Vfs/Sharing.php b/api/src/Vfs/Sharing.php index a2f073a89b..4ed1b1cfb1 100644 --- a/api/src/Vfs/Sharing.php +++ b/api/src/Vfs/Sharing.php @@ -90,9 +90,8 @@ class Sharing extends \EGroupware\Api\Sharing */ public static function setup_share($keep_session, &$share) { - // need to reset fs_tab, as resolve_url does NOT work with just share mounted - if (count($GLOBALS['egw_info']['server']['vfs_fstab']) <= 1) + if (empty($GLOBALS['egw_info']['server']['vfs_fstab']) || count($GLOBALS['egw_info']['server']['vfs_fstab']) <= 1) { unset($GLOBALS['egw_info']['server']['vfs_fstab']); // triggers reset of fstab in mount() $GLOBALS['egw_info']['server']['vfs_fstab'] = Vfs::mount();