Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/env/PhabricatorConfigLocalSource.php
Show All 19 Lines | public function deleteKeys(array $keys) { | ||||
return parent::deleteKeys($keys); | return parent::deleteKeys($keys); | ||||
} | } | ||||
private function loadConfig() { | private function loadConfig() { | ||||
$path = $this->getConfigPath(); | $path = $this->getConfigPath(); | ||||
if (@file_exists($path)) { | if (@file_exists($path)) { | ||||
$data = @file_get_contents($path); | $data = @file_get_contents($path); | ||||
if ($data) { | if ($data) { | ||||
$data = json_decode($data, true); | try { | ||||
if (is_array($data)) { | return phutil_json_decode($data); | ||||
return $data; | } catch (PhutilJSONParserException $ex) { | ||||
return array(); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
return array(); | return array(); | ||||
} | } | ||||
private function saveConfig() { | private function saveConfig() { | ||||
Show All 13 Lines |