From 6355fa0c9ec16273df4a1c42f0d2914124f071a4 Mon Sep 17 00:00:00 2001 From: Robert Date: Tue, 20 Dec 2022 02:06:19 -0500 Subject: [PATCH] Fix for 1st Unit Test in tts_project. --- src/classes/app.php | 4 ++-- src/main.inc.php | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/classes/app.php b/src/classes/app.php index 7670600..755f563 100644 --- a/src/classes/app.php +++ b/src/classes/app.php @@ -192,8 +192,8 @@ class app { /** * Does load controller by calling action */ - public function load_controller(): void { - $this->action($this->file, $this->class, $this->method, $this->params); + public function load_controller() { + return $this->action($this->file, $this->class, $this->method, $this->params); } } // end of app diff --git a/src/main.inc.php b/src/main.inc.php index 16f9281..bb0a086 100644 --- a/src/main.inc.php +++ b/src/main.inc.php @@ -24,7 +24,10 @@ final class views { } } } -views::ob_start(); + +if (\tts\site_helper::get_testing() === false) { + views::ob_start(); +} require_once TTS_FRAMEWORK . 'bootstrap/errors.php'; require_once TTS_FRAMEWORK . 'bootstrap/validator.php';