Phd status calls to undefined method when there's no instance

$ phd status
[2019-07-12 00:18:18] EXCEPTION: (Error) Call to undefined method PhabricatorDaemonManagementStatusWorkflow::writeInfo() at [<phabricator>/src/applications/daemon/management/PhabricatorDaemonManagementStatusWorkflow.php:25]
arcanist(head=stable, ref.stable=feb5f4d42c4f), phabricator(head=stable, ref.stable=4c242256e490), phutil(head=stable, ref.stable=a4feaf52f4c0)
  #0 PhabricatorDaemonManagementStatusWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:457]
  #1 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:349]
  #2 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/daemon/manage_daemons.php:23]

I believe this is caused by the writeInfo() function being called instead of the logInfo() function in the src/applications/daemon/management/PhabricatorDaemonManagementStatusWorkflow.php file:

  public function execute(PhutilArgumentParser $args) {
    $process_refs = $this->getOverseerProcessRefs();

    if (!$process_refs) {
      $instance = $this->getInstance();
      if ($instance !== null) {
          pht('NO DAEMONS'),
            'There are no running daemon processes for the current '.
            'instance ("%s").',
      } else {
          pht('NO DAEMONS'),
          pht('There are no running daemon processes.'));

      return 1;

Reproduction Instructions
Run phd status when no instance is running.

Phabricator/Arcanist Version
arcanist feb5f4d42c4fe0001e76428e80d5e88262308802 (22 Jun 2019)
libphutil a4feaf52f4c01ff692e46e53bb731c9d7e5bedfe (28 Jun 2019)

Thanks! This should be resolved by

Just for general context if anyone ends up here in the future, $this->getInstance() is talking about instancing Phabricator itself, not referring to anything like “the current running Daemon instance”.

Phabricator supports instancing (running multiple different installs on one physical copy of the software) via cluster.instance configuration and the PHABRICATOR_INSTANCE environment variable. The only real use case for this feature is running a SAAS cluster in a shared environment like Phacility and we haven’t seen any meaningful customer interest in doing this so it’s not particularly well documented, but the meaning of this code is that if PHABRICATOR_INSTANCE=turtle bin/phd stop is run we only want to stop the daemons associated with, not necessarily all daemons running on the host.