Loading...
 
Skip to main content

Incorrect logs truncate before inserting to database

Status
Closed
Subject
Incorrect logs truncate before inserting to database
Version
10.x
Category
  • Error
  • Developer Training
Feature
Logs (system & action)
Resolution status
New
Submitted by
MaxA
Lastmod by
syracine
Rating
(0)
Description

It happens, when multibyte strings is recording to database.
Function "substr" work incorrect with multibytes string.

Solution

Just replace used function from "substr()" to "mb_strcut()"

diff -r wiki/lib/logs/logslib.php tiki-10.2/lib/logs/logslib.php
204c204
< $param = mb_strcut($param, 0, '200');


> $param = substr($param, 0, '200');

Workaround
Correct in version 12 starting on 2013-07-14
Importance
7
Easy to solve?
10 easy
Priority
70
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
4509
Created
Tuesday 07 May, 2013 08:58:23 UTC
by MaxA
LastModif
Sunday 14 July, 2013 21:48:26 UTC


Show PHP error messages