summaryrefslogtreecommitdiff
path: root/includes/Profiler.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/Profiler.php')
-rw-r--r--includes/Profiler.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/includes/Profiler.php b/includes/Profiler.php
index da3a82ed..8e1cd147 100644
--- a/includes/Profiler.php
+++ b/includes/Profiler.php
@@ -301,6 +301,9 @@ class Profiler {
* @static
*/
function logToDB($name, $timeSum, $eventCount) {
+ # Do not log anything if database is readonly (bug 5375)
+ if( wfReadOnly() ) { return; }
+
# Warning: $wguname is a live patch, it should be moved to Setup.php
global $wguname, $wgProfilePerHost;
@@ -361,4 +364,4 @@ class Profiler {
}
-?>
+