1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00

Fix Maniphest fatal when editing a task without changing anything

Summary:
Transaction editor attempted to do things with an empty transaction array, just
skip editing ops if nothing changed.

Test Plan:
Edited a Maniphest task without changing anything.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, jungejason, aran
CC: sandra, anjali, aran, tuomaspelkonen
Differential Revision: 248
This commit is contained in:
epriestley 2011-05-06 17:22:48 -07:00
parent 33b0675d3d
commit 4e70c434fd

View file

@ -136,8 +136,10 @@ class ManiphestTaskEditController extends ManiphestController {
$transactions[] = $transaction;
}
$editor = new ManiphestTransactionEditor();
$editor->applyTransactions($task, $transactions);
if ($transactions) {
$editor = new ManiphestTransactionEditor();
$editor->applyTransactions($task, $transactions);
}
return id(new AphrontRedirectResponse())
->setURI('/T'.$task->getID());