Fix errors in async service, since r53254 "run shutdown callbacks after sending output to user"

This commit is contained in:
Ralf Becker 2015-07-30 07:15:19 +00:00
parent 3b560bb9ee
commit 23c4d052c7

View File

@ -591,7 +591,7 @@ class egw extends egw_minimal
}
// now we can close the session
// without closing the session fastcgi_finish_request() will NOT send output to user
$GLOBALS['egw']->session->commit_session();
if (isset($GLOBALS['egw']->session)) $GLOBALS['egw']->session->commit_session();
// flush all output to user
/* does NOT work on Apache :-(
@ -601,7 +601,7 @@ class egw extends egw_minimal
}
flush();*/
// working for fastCGI :-)
if (function_exists('fastcgi_finish_request'))
if (function_exists('fastcgi_finish_request') && substr($_SERVER['PHP_SELF'], -32) != '/phpgwapi/cron/asyncservices.php')
{
fastcgi_finish_request();
}