aboutsummaryrefslogtreecommitdiff
path: root/api/course
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-10-18 14:19:47 +0200
committerAgando <roduccomm@gmail.com>2026-10-18 14:19:47 +0200
commitcfc27891023a2728328f155860a286aae7cb8bfc (patch)
treebb62464e2514756b5ed887f49c18832c73a787b6 /api/course
parent360183b4ef928064d0b9b916daf294e4cc89cf1d (diff)
newOS4 course: post-exec review fixes (telemetry detail sanitize, skill-sync retry, atlas check)
Diffstat (limited to 'api/course')
-rw-r--r--api/course/event.php6
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';