From c0cb4c4cdcd690005b25d4aca9306d33f0dbfaa2 Mon Sep 17 00:00:00 2001 From: Lufei Date: Tue, 16 May 2023 09:35:36 +0800 Subject: [PATCH] * Fix headers already sent for xhprof. --- framework/base/router.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/base/router.class.php b/framework/base/router.class.php index 6b4a3dd4d2..d1799613ea 100644 --- a/framework/base/router.class.php +++ b/framework/base/router.class.php @@ -801,7 +801,7 @@ class baseRouter $xhprofRuns = new \XHProfRuns_Default($outputDir); $type = "{$this->moduleName}_{$this->methodName}"; $runID = $xhprofRuns->save_run($log, $type); - header("Xhprof-RunID: {$runID}"); + if(!headers_sent()) header("Xhprof-RunID: {$runID}"); return true; }