From f61c35b54492378f83d530d596950cc2a34e9845 Mon Sep 17 00:00:00 2001 From: nguyenanhung Date: Wed, 2 Aug 2023 10:54:25 +0700 Subject: [PATCH] fixed cleantext --- helpers/text_helper.php | 9 ++++++--- src/BaseHelper.php | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/helpers/text_helper.php b/helpers/text_helper.php index ea7361f..29eb5bc 100644 --- a/helpers/text_helper.php +++ b/helpers/text_helper.php @@ -96,15 +96,18 @@ function clean_text($text = '') /** * Function clean_title * - * @param string $text + * @param mixed $text * - * @return string + * @return string|null * @author : 713uk13m * @copyright: 713uk13m * @time : 12/10/2020 36:32 */ - function clean_title($text = '') + function clean_title($text) { + if ($text === null) { + return null; + } $output = trim($text); if ($output !== '') { $output = clean_text($output); diff --git a/src/BaseHelper.php b/src/BaseHelper.php index 4f487d9..d4d2527 100644 --- a/src/BaseHelper.php +++ b/src/BaseHelper.php @@ -19,8 +19,8 @@ */ class BaseHelper { - const VERSION = '1.4.6'; - const LAST_MODIFIED = '2023-07-25'; + const VERSION = '1.4.7'; + const LAST_MODIFIED = '2023-08-02'; const PROJECT_NAME = 'CodeIgniter - Basic Helper'; const AUTHOR_NAME = 'Hung Nguyen'; const AUTHOR_FULL_NAME = 'Hung Nguyen';