fix a bunch of PHP Warnings

This commit is contained in:
Ralf Becker 2021-10-12 11:51:28 +02:00
parent 0f4abf8606
commit d51d0eee83

View File

@ -84,7 +84,7 @@ class Bundle
if (!in_array($bundle, $included_bundles))
{
$included_bundles[] = $bundle;
$minurl = self::$bundle2minurl[$bundle];
$minurl = self::$bundle2minurl[$bundle] ?? null;
if (!isset($minurl) && isset($GLOBALS['egw_info']['apps'][$bundle]))
{
$minurl = '/'.$bundle.'/js/app.min.js';
@ -131,7 +131,7 @@ class Bundle
*/
protected static function urls(array $js_includes, &$max_modified=null, $minurl=null)
{
$debug_minify = $GLOBALS['egw_info']['server']['debug_minify'] === 'True';
$debug_minify = !empty($GLOBALS['egw_info']['server']['debug_minify']) && $GLOBALS['egw_info']['server']['debug_minify'] === 'True';
// ignore not existing minurl
if (!empty($minurl) && !file_exists(EGW_SERVER_ROOT.$minurl)) $minurl = null;
$to_include_first = $to_include = $to_minify = array();
@ -141,7 +141,7 @@ class Bundle
{
if ($path == '/api/js/jsapi/egw.js') continue; // Leave egw.js out of bundle
unset($query);
list($path,$query) = explode('?',$path,2);
list($path,$query) = explode('?',$path,2)+[null,null];
$mod = filemtime(EGW_SERVER_ROOT.$path);
if ($mod > $max_modified) $max_modified = $mod;