From 773ccc318f2769c9b7579630569b5d8ba47b114b Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 2 Jun 2012 11:11:08 +0100 Subject: Replaced `==` with `===` and `!=` with `!==` in /system/helpers --- system/helpers/text_helper.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'system/helpers/text_helper.php') 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 = '', $tag_close = '') { - 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"; } -- cgit v1.2.3-24-g4f1b