aboutsummaryrefslogtreecommitdiff
path: root/app/Models/CategoryDAO.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-09-02 13:19:58 +0200
committerGravatar GitHub <noreply@github.com> 2018-09-02 13:19:58 +0200
commit32d9c3b7905f4e43ffdf4bf2bf37723cfd18390c (patch)
treec2ed9eb08533ae795b1b97718223c6bb614a18e3 /app/Models/CategoryDAO.php
parent565e34f7bdcc35d946d10a1840f36f40c6804f62 (diff)
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
Diffstat (limited to 'app/Models/CategoryDAO.php')
-rw-r--r--app/Models/CategoryDAO.php2
1 files changed, 1 insertions, 1 deletions
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)) {