From 32d9c3b7905f4e43ffdf4bf2bf37723cfd18390c Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sun, 2 Sep 2018 13:19:58 +0200 Subject: Use mb_strcut (#1996) * Use mb_strcut Avoid cutting in the middle of a multi-byte UTF-8 character * Forgotten php5-* * Typo * Whitespace * More mb_strcut --- app/Models/CategoryDAO.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Models/CategoryDAO.php') diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php index ef2c402a0..cf6b3bae3 100644 --- a/app/Models/CategoryDAO.php +++ b/app/Models/CategoryDAO.php @@ -9,7 +9,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable $stm = $this->bd->prepare($sql); $values = array( - substr($valuesTmp['name'], 0, 255), + mb_strcut($valuesTmp['name'], 0, 255, 'UTF-8'), ); if ($stm && $stm->execute($values)) { -- cgit v1.2.3