From ae408c4bfb482647a673ed14e87523eb8083a952 Mon Sep 17 00:00:00 2001 From: alextselegidis Date: Mon, 15 Nov 2021 09:48:26 +0100 Subject: [PATCH] Adjusted the components html helper function --- application/helpers/html_helper.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/application/helpers/html_helper.php b/application/helpers/html_helper.php index 2285e712..7823c6b4 100644 --- a/application/helpers/html_helper.php +++ b/application/helpers/html_helper.php @@ -28,10 +28,8 @@ if ( ! function_exists('component')) * @param string $component Component template file name. * @param string $attributes HTML attributes for the parent component element. * @param array $params Additional parameters for the component. - * - * @return string */ - function component(string $component, string $attributes = '', array $params = []): string + function component(string $component, string $attributes = '', array $params = []) { /** @var EA_Controller $CI */ $CI = &get_instance(); @@ -40,7 +38,7 @@ if ( ! function_exists('component')) 'attributes' => $attributes ]); - return $CI->load->view('components/' . $component, $vars, TRUE); + echo $CI->load->view('components/' . $component, $vars, true); } }