summaryrefslogtreecommitdiffstats
path: root/system/helpers/text_helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers/text_helper.php')
-rw-r--r--system/helpers/text_helper.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php
index e4451ae81..8a1f01b51 100644
--- a/system/helpers/text_helper.php
+++ b/system/helpers/text_helper.php
@@ -51,7 +51,7 @@ if ( ! function_exists('word_limiter'))
*/
function word_limiter($str, $limit = 100, $end_char = '…')
{
- if (trim($str) == '')
+ if (trim($str) === '')
{
return $str;
}
@@ -258,7 +258,7 @@ if ( ! function_exists('word_censor'))
foreach ($censored as $badword)
{
- if ($replacement != '')
+ if ($replacement !== '')
{
$str = preg_replace("/({$delim})(".str_replace('\*', '\w*?', preg_quote($badword, '/')).")({$delim})/i", "\\1{$replacement}\\3", $str);
}
@@ -338,12 +338,12 @@ if ( ! function_exists('highlight_phrase'))
*/
function highlight_phrase($str, $phrase, $tag_open = '<strong>', $tag_close = '</strong>')
{
- if ($str == '')
+ if ($str === '')
{
return '';
}
- if ($phrase != '')
+ if ($phrase !== '')
{
return preg_replace('/('.preg_quote($phrase, '/').')/i', $tag_open.'\\1'.$tag_close, $str);
}
@@ -464,7 +464,7 @@ if ( ! function_exists('word_wrap'))
// If $temp contains data it means we had to split up an over-length
// word into smaller chunks so we'll add it back to our current line
- if ($temp != '')
+ if ($temp !== '')
{
$output .= $temp."\n".$line."\n";
}