diff options
| author | Agando <roduccomm@gmail.com> | 2026-10-18 14:19:47 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-10-18 14:19:47 +0200 |
| commit | 1c1e5765e2d912f1b803ba11691b3ace19106361 (patch) | |
| tree | 569c4992379595cccff46330d14c8e81f7e9ff0a /api/course/event.php | |
| parent | 7150d6fa9538b808c647423a629f31a5a138eaca (diff) | |
newOS4 course: post-exec review fixes (telemetry detail sanitize, skill-sync retry, atlas check)
Diffstat (limited to 'api/course/event.php')
| -rw-r--r-- | api/course/event.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/api/course/event.php b/api/course/event.php index 696d1c5..ce11041 100644 --- a/api/course/event.php +++ b/api/course/event.php @@ -30,7 +30,11 @@ if (random_int(1, 50) === 1) { } $detail = isset($p['detail']) && is_array($p['detail']) ? array_slice($p['detail'], 0, 8, true) : []; -foreach ($detail as $k => $v) { if (is_string($v)) $detail[$k] = substr($v, 0, 300); } +foreach ($detail as $k => $v) { + if (is_string($v)) $detail[$k] = substr($v, 0, 300); + elseif (is_scalar($v)) $detail[$k] = substr((string)$v, 0, 300); + else $detail[$k] = gettype($v); +} $row = ['ts' => gmdate('c'), 'type' => $type, 'sid' => $sid, 'version' => substr((string)($p['version'] ?? ''), 0, 40), 'detail' => $detail]; $out = $dir . '/events-' . date('Ym') . '.jsonl'; |