diff --git a/src/applications/differential/parser/DifferentialChangesetParser.php b/src/applications/differential/parser/DifferentialChangesetParser.php index 9fc0adf537..e49538fd91 100644 --- a/src/applications/differential/parser/DifferentialChangesetParser.php +++ b/src/applications/differential/parser/DifferentialChangesetParser.php @@ -458,6 +458,10 @@ final class DifferentialChangesetParser extends Phobject { } public function saveCache() { + if (PhabricatorEnv::isReadOnly()) { + return false; + } + if ($this->highlightErrors) { return false; } diff --git a/src/applications/people/storage/PhabricatorUser.php b/src/applications/people/storage/PhabricatorUser.php index 464c14492f..85b2590d33 100644 --- a/src/applications/people/storage/PhabricatorUser.php +++ b/src/applications/people/storage/PhabricatorUser.php @@ -968,6 +968,10 @@ final class PhabricatorUser * @task availability */ public function writeAvailabilityCache(array $availability, $ttl) { + if (PhabricatorEnv::isReadOnly()) { + return $this; + } + $unguarded = AphrontWriteGuard::beginScopedUnguardedWrites(); queryfx( $this->establishConnection('w'),