diff --git a/src/applications/phriction/conduit/PhrictionEditConduitAPIMethod.php b/src/applications/phriction/conduit/PhrictionEditConduitAPIMethod.php index 9d97ed7f8c..d1e400a485 100644 --- a/src/applications/phriction/conduit/PhrictionEditConduitAPIMethod.php +++ b/src/applications/phriction/conduit/PhrictionEditConduitAPIMethod.php @@ -41,12 +41,19 @@ final class PhrictionEditConduitAPIMethod extends PhrictionConduitAPIMethod { } $xactions = array(); - $xactions[] = id(new PhrictionTransaction()) - ->setTransactionType(PhrictionDocumentTitleTransaction::TRANSACTIONTYPE) - ->setNewValue($request->getValue('title')); - $xactions[] = id(new PhrictionTransaction()) - ->setTransactionType(PhrictionDocumentContentTransaction::TRANSACTIONTYPE) - ->setNewValue($request->getValue('content')); + if ($request->getValue('title')) { + $xactions[] = id(new PhrictionTransaction()) + ->setTransactionType( + PhrictionDocumentTitleTransaction::TRANSACTIONTYPE) + ->setNewValue($request->getValue('title')); + } + + if ($request->getValue('content')) { + $xactions[] = id(new PhrictionTransaction()) + ->setTransactionType( + PhrictionDocumentContentTransaction::TRANSACTIONTYPE) + ->setNewValue($request->getValue('content')); + } $editor = id(new PhrictionTransactionEditor()) ->setActor($request->getUser())