Skip to content

Commit 2094fef

Browse files
committed
refactor: drop redundant charlim clamp in word_wrap()
1 parent 2f0b223 commit 2094fef

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎system/Helpers/text_helper.php‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,9 +345,6 @@ function convert_accented_characters(string $str): string
345345
*/
346346
function word_wrap(string $str, int $charlim = 76): string
347347
{
348-
// A limit below 1 is meaningless and would make the wrapping loop endless
349-
$charlim = max(1, $charlim);
350-
351348
// Reduce multiple spaces
352349
$str = preg_replace('| +|', ' ', $str);
353350

0 commit comments

Comments
 (0)