Aaron Schulz has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/202082

Change subject: Log when User::saveSettings is called in read-only mode
......................................................................

Log when User::saveSettings is called in read-only mode

Change-Id: I56a1760f2e6bbda889590777b553a8dfda587590
---
M includes/User.php
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/82/202082/1

diff --git a/includes/User.php b/includes/User.php
index 322f8af..d832cbd 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -3586,7 +3586,13 @@
                global $wgAuth;
 
                if ( wfReadOnly() ) {
-                       return; // @TODO: caller should deal with this instead!
+                       // @TODO: caller should deal with this instead!
+                       // This should really just be an exception.
+                       MWExceptionHandler::logException( new DBExpectedError(
+                               null,
+                               "Could not update user with ID '{$this->mId}'; 
DB is read-only."
+                       ) );
+                       return;
                }
 
                $this->load();

-- 
To view, visit https://gerrit.wikimedia.org/r/202082
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I56a1760f2e6bbda889590777b553a8dfda587590
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to