mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-36670 logging: action parameter length restricted to 40 chars
This commit is contained in:
parent
c1ed254643
commit
a4496bdde9
@ -185,6 +185,11 @@ class store implements \tool_log\log\store, \core\log\sql_select_reader {
|
||||
// database so that it doesn't cause a DB error. Log a warning so that
|
||||
// developers can avoid doing things which are likely to cause this on a
|
||||
// routine basis.
|
||||
if (\core_text::strlen($action) > 40) {
|
||||
$action = \core_text::substr($action, 0, 37) . '...';
|
||||
debugging('Warning: logged very long action', DEBUG_DEVELOPER);
|
||||
}
|
||||
|
||||
if (!empty($info) && \core_text::strlen($info) > 255) {
|
||||
$info = \core_text::substr($info, 0, 252) . '...';
|
||||
debugging('Warning: logged very long info', DEBUG_DEVELOPER);
|
||||
|
Loading…
x
Reference in New Issue
Block a user