From acd767c7f33da9069211176903aa76b1a36bc9f4 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 26 Jan 2021 14:45:21 -0800 Subject: [PATCH] Allow "differential.createinline" to accept JSON "false" for "isNewFile" Summary: See . 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 --- .../conduit/DifferentialCreateInlineConduitAPIMethod.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/differential/conduit/DifferentialCreateInlineConduitAPIMethod.php b/src/applications/differential/conduit/DifferentialCreateInlineConduitAPIMethod.php index 6447385558..b444c54741 100644 --- a/src/applications/differential/conduit/DifferentialCreateInlineConduitAPIMethod.php +++ b/src/applications/differential/conduit/DifferentialCreateInlineConduitAPIMethod.php @@ -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();