From ac7f2e9f085a3d695352a93a9bf0282ac9c348f3 Mon Sep 17 00:00:00 2001 From: FredericoFalcao Date: Sat, 7 Jun 2025 15:12:23 +0300 Subject: [PATCH 1/2] Update index.php --- plt/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plt/index.php b/plt/index.php index 0cf1a7f..5bbfd50 100755 --- a/plt/index.php +++ b/plt/index.php @@ -85,7 +85,7 @@ function processActiveTable($activeTable) { ensureLastUpdatedColumnExists($Name); - $rowsToProcess = sql("SELECT * FROM $Name WHERE LastUpdated > '$LastUpdated'"); + $rowsToProcess = sql_read_and_hydrate("SELECT * FROM $Name WHERE LastUpdated > '$LastUpdated'"); foreach ($rowsToProcess as $unprocessedRow) { processTableRow($activeTable, $unprocessedRow); From 56a17dfb845ac0caa71b86271a016d99fa51bd79 Mon Sep 17 00:00:00 2001 From: FredericoFalcao Date: Sat, 7 Jun 2025 16:52:20 +0300 Subject: [PATCH 2/2] Update handleTriggerExecutionResult.inc.php --- plt/handleTriggerExecutionResult.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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;