Skip to content

Commit 144153b

Browse files
authored
Merge pull request #1094 from whitevast/patch-1
Update objects.class.php
2 parents 076c4eb + 4d3ea89 commit 144153b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/objects/objects.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ function callMethod($name, $params = 0, $parentClassId = 0)
616616
$source = urldecode($_SERVER['REQUEST_URI']);
617617
}
618618
if (strlen($source) > 250) {
619-
$source = substr($source, 0, 250) . '...';
619+
$source = mb_substr($source, 0, 250) . '...';
620620
}
621621
$update_rec['EXECUTED_SRC'] = $source;
622622

@@ -634,7 +634,7 @@ function callMethod($name, $params = 0, $parentClassId = 0)
634634
unset($saved_params['SOURCE']);
635635
$update_rec['EXECUTED_PARAMS'] = json_encode($saved_params, JSON_UNESCAPED_UNICODE);
636636
if (strlen($update_rec['EXECUTED_PARAMS']) > 250) {
637-
$update_rec['EXECUTED_PARAMS'] = substr($update_rec['EXECUTED_PARAMS'], 0, 250);
637+
$update_rec['EXECUTED_PARAMS'] = mb_substr($update_rec['EXECUTED_PARAMS'], 0, 250);
638638
}
639639
}
640640
SQLUpdate('methods', $update_rec);
@@ -848,7 +848,7 @@ function setProperty($property, $value, $no_linked = 0, $source = '')
848848
$source = urldecode($_SERVER['REQUEST_URI']);
849849
}
850850
if (strlen($source) > 250) {
851-
$source = substr($source, 0, 250) . '...';
851+
$source = mb_substr($source, 0, 250) . '...';
852852
}
853853

854854
if (defined('TRACK_DATA_CHANGES') && TRACK_DATA_CHANGES == 1) {
@@ -1118,7 +1118,7 @@ function getWatchedProperties($objects)
11181118
}
11191119
if (is_array($props)) {
11201120
foreach ($props as $k => $v) {
1121-
if (substr($v['TITLE'], 0, 1) == '_') continue;
1121+
if (mb_substr($v['TITLE'], 0, 1) == '_') continue;
11221122
$properties[] = array('PROPERTY' => mb_strtolower($this->object_title . '.' . $v['TITLE'], 'UTF-8'), 'OBJECT_ID' => $object_id);
11231123
}
11241124
}

0 commit comments

Comments
 (0)