Page MenuHomePhorge

Too few arguments to function DiffusionDiffQueryConduitAPIMethod::getDefaultParser(), 0 passed in DiffusionDiffQueryConduitAPIMethod.php on line 156 and exactly 1 expected
Closed, ResolvedPublic

Description

After migrating a Phabricator to Phorge,

Surfing on a company Subversion repository on this page:

https://phorge.example.com/R188:20

I've met the following issue:

Too few arguments to function DiffusionDiffQueryConduitAPIMethod::getDefaultParser(), 0 passed in /var/www/phorge/src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php on line 156 and exactly 1 expected

Line involved:

https://we.phorge.it/source/phorge/browse/master/src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php;03afb97ff20bd5480ecfa0fa809e3b751bd973e8$156

Possible causes

rP69c64c1e83e2: Teach Commit View about Encoding

Proposed solution

I blindly fixed with the following local patch:

diff --git a/src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
index 397ccefa86..d97f09cc4e 100644
--- a/src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionDiffQueryConduitAPIMethod.php
@@ -153,7 +153,7 @@ final class DiffusionDiffQueryConduitAPIMethod
     $arcanist_changes = DiffusionPathChange::convertToArcanistChanges(
       $path_changes);

-    $parser = $this->getDefaultParser();
+    $parser = $this->getDefaultParser($request);
     $parser->setChanges($arcanist_changes);
     $parser->forcePath($path->getPath());
     $changes = $parser->parseDiff($raw_diff);