1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 06:42:42 +01:00

Allow "differential.createinline" to accept JSON "false" for "isNewFile"

Summary:
See <https://discourse.phabricator-community.org/t/error-creating-inline-comment-via-conduit-api/4535>. See T12678.

This API method currently does not accept a JSON "false", but reasonably should.

Test Plan:
  - Called method with "isNewFile: false".
    - Before: type error.
    - After: inline comment.

Differential Revision: https://secure.phabricator.com/D21522
This commit is contained in:
epriestley 2021-01-26 14:45:21 -08:00
parent ed86c42b26
commit acd767c7f3

View file

@ -100,7 +100,7 @@ final class DifferentialCreateInlineConduitAPIMethod
->setChangesetID($cid)
->setAuthorPHID($request->getUser()->getPHID())
->setContent($request->getValue('content'))
->setIsNewFile($request->getValue('isNewFile'))
->setIsNewFile((int)$request->getValue('isNewFile'))
->setLineNumber($request->getValue('lineNumber'))
->setLineLength($request->getValue('lineLength', 0))
->save();