From 1f5418bfa224740559b761cb53cd1b5b31a51c25 Mon Sep 17 00:00:00 2001 From: Pathologic Date: Wed, 27 Aug 2014 03:01:00 +0300 Subject: [PATCH 1/2] fix "headers already sent" messages in output --- core/components/console/processors/exec.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/components/console/processors/exec.class.php b/core/components/console/processors/exec.class.php index 3696a9d..46f0ff4 100644 --- a/core/components/console/processors/exec.class.php +++ b/core/components/console/processors/exec.class.php @@ -17,7 +17,11 @@ public function process() { $code = $this->getProperty('code'); $_SESSION['Console']['code'] = $code; $code = preg_replace('/^ *(<\?php|<\?)/mi', '', $code); - return eval($code); + ob_start(); + echo eval($code); + $output = ob_get_contents(); + ob_end_clean(); + return ($output); } } From fcd7209c724b8be3ca57906b80ec9abbcec2109d Mon Sep 17 00:00:00 2001 From: Pathologic Date: Wed, 27 Aug 2014 03:05:13 +0300 Subject: [PATCH 2/2] fix --- core/components/console/processors/exec.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/components/console/processors/exec.class.php b/core/components/console/processors/exec.class.php index 46f0ff4..a16853d 100644 --- a/core/components/console/processors/exec.class.php +++ b/core/components/console/processors/exec.class.php @@ -18,7 +18,7 @@ public function process() { $_SESSION['Console']['code'] = $code; $code = preg_replace('/^ *(<\?php|<\?)/mi', '', $code); ob_start(); - echo eval($code); + eval($code); $output = ob_get_contents(); ob_end_clean(); return ($output);