From: Aaron Schulz Date: Mon, 6 Apr 2015 18:26:42 +0000 (-0700) Subject: Log when User::saveSettings is called in read-only mode X-Git-Tag: 1.31.0-rc.0~11816^2 X-Git-Url: http://git.cyclocoop.org/%22.htmlspecialchars%28%24url_syndic%29.%22?a=commitdiff_plain;h=6af07cbe1fd8a64e0af9d1d485cde2b23d4cd2a2;p=lhc%2Fweb%2Fwiklou.git Log when User::saveSettings is called in read-only mode Change-Id: I56a1760f2e6bbda889590777b553a8dfda587590 --- diff --git a/includes/User.php b/includes/User.php index 322f8af5ec..d832cbd488 100644 --- a/includes/User.php +++ b/includes/User.php @@ -3586,7 +3586,13 @@ class User implements IDBAccessObject { 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();