Merge "Log when User::saveSettings is called in read-only mode"
[lhc/web/wiklou.git] / includes / User.php
index 6ac320e..ecb31ba 100644 (file)
@@ -3592,7 +3592,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();