Skip to content

Instantly share code, notes, and snippets.

@cjrasmussen
Created March 6, 2021 16:30
Trello Webhook - Missing data
<?php
} else {
// DATA LOOKS NOT GOOD, NOTE IN CARD
$msg = '';
if (!$account_id) $msg .= 'Invalid account selected' . "\n\n";
if (!is_numeric($amt)) $msg .= 'Invalid amount selected: ' . $amt . "\n\n";
if (!$category) $msg .= 'No category found' . "\n\n";
if ($msg) $trello->request('POST', ('/1/card/' . $data->model->id . '/actions/comments'), array('text' => trim($msg)));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment