Summary:
Fixes a minor issue from D14034. PHP doesn't like `clone null;`, and if you type a nonsense command like `arc nbrhch` (as I frequently do) we try to `clone null` here.
Instead, just `return null;` if no workflow matches. Clone otherwise.
Test Plan:
- Ran `arc nbrhcanc`
- Ran `arc branch`
Reviewers: BYK, chad
Reviewed By: chad
Differential Revision: https://secure.phabricator.com/D14112
$command = 'version';
}
- return clone idx($this->buildAllWorkflows(), $command);
+ $workflow = idx($this->buildAllWorkflows(), $command);
+
+ if (!$workflow) {
+ return null;
+ }
+
+ return clone $workflow;
}
public function buildAllWorkflows() {