Page MenuHomePhabricator

D9749.diff
No OneTemporary

D9749.diff

diff --git a/src/applications/daemon/storage/PhabricatorDaemonLog.php b/src/applications/daemon/storage/PhabricatorDaemonLog.php
--- a/src/applications/daemon/storage/PhabricatorDaemonLog.php
+++ b/src/applications/daemon/storage/PhabricatorDaemonLog.php
@@ -13,7 +13,7 @@
protected $host;
protected $pid;
protected $argv;
- protected $explicitArgv;
+ protected $explicitArgv = array();
protected $status;
public function getConfiguration() {
@@ -25,6 +25,14 @@
) + parent::getConfiguration();
}
+ public function getExplicitArgv() {
+ $argv = $this->explicitArgv;
+ if (!is_array($argv)) {
+ return array();
+ }
+ return $argv;
+ }
+
/* -( PhabricatorPolicyInterface )----------------------------------------- */
diff --git a/src/infrastructure/daemon/control/PhabricatorDaemonReference.php b/src/infrastructure/daemon/control/PhabricatorDaemonReference.php
--- a/src/infrastructure/daemon/control/PhabricatorDaemonReference.php
+++ b/src/infrastructure/daemon/control/PhabricatorDaemonReference.php
@@ -12,7 +12,13 @@
public static function newFromFile($path) {
$pid_data = Filesystem::readFile($path);
- $dict = phutil_json_decode($pid_data);
+
+ try {
+ $dict = phutil_json_decode($pid_data);
+ } catch (PhutilJSONParserException $ex) {
+ $dict = array();
+ }
+
$ref = self::newFromDictionary($dict);
$ref->pidFile = $path;
return $ref;

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 15, 2:24 AM (6 d, 23 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7680688
Default Alt Text
D9749.diff (1 KB)

Event Timeline