Merge "Reduce outages due to master DB problems in doViewUpdates"
[lhc/web/wiklou.git] / includes / page / WikiPage.php
index 8754fb9..059a3f8 100644 (file)
@@ -1142,7 +1142,12 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                // Update newtalk / watchlist notification status
-               $user->clearNotification( $this->mTitle, $oldid );
+               try {
+                       $user->clearNotification( $this->mTitle, $oldid );
+               } catch ( DBError $e ) {
+                       // Avoid outage if the master is not reachable
+                       MWExceptionHandler::logException( $e );
+               }
        }
 
        /**