diff --git a/plt/handleTriggerExecutionResult.inc.php b/plt/handleTriggerExecutionResult.inc.php index 642e856..b1bd37f 100644 --- a/plt/handleTriggerExecutionResult.inc.php +++ b/plt/handleTriggerExecutionResult.inc.php @@ -14,10 +14,13 @@ function handleTriggerExecutionResult($result, $stdout, $stderr, $originalRow, $ if ($result !== 0) { // Update table error status and notify via Telegram if execution failed updateTriggerError($tableName, $stderr); - } else { + } else { // Decode the output from JSON to array $newRowValue = json_decode($stdout, true); + // Ignore the hydrate columns + $newRowValue = array_filter($newRowValue, fn($k) => !str_ends_with($k, '_ref'), ARRAY_FILTER_USE_KEY); + if ($newRowValue === null) { updateTriggerError($tableName, 'Invalid JSON output from sandboxed execution.'); return;