Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lib/Trello/Api/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,14 @@ public function create(array $params = array())
*/
public function update($id, array $params = array())
{
// If the due date is set, but is empty, remove it from the fields that are sent in the request.
// This prevents Trello from adding a "X set this card to be due Invalid date" comment.
foreach($params as $param_name => $param_value) {
if($param_name == 'due' && empty($param_value)) {
unset($params[$param_name]);
}
}

return $this->put($this->getPath().'/'.rawurlencode($id), $params);
}

Expand Down