!str_ends_with($k, '_ref'), ARRAY_FILTER_USE_KEY); if ($newRowValue === null) { updateTriggerError($tableName, 'Invalid JSON output from sandboxed execution.'); return; } // Check if the new data differs from the original data if ($newRowValue !== $originalRow) { // Update the database row accordingly updateDatabaseRow($tableName, $originalRow, $newRowValue); } // Clear any previous error status clearTriggerError($tableName); } }