From a0cae0b5750bdd40daec9fa15e0fe8bc9cebdae2 Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Fri, 30 Dec 2005 23:13:31 +0000 Subject: [PATCH] * Print profiling with stack empty but collated list full * Silently ignore DB writes if db is unreachable --- includes/Profiling.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/Profiling.php b/includes/Profiling.php index 92e15650a5..ca81ec0c8f 100755 --- a/includes/Profiling.php +++ b/includes/Profiling.php @@ -109,7 +109,7 @@ class Profiler { global $wgDebugFunctionEntry; $wgDebugFunctionEntry = false; - if (!count($this->mStack)) { + if (!count($this->mStack) && !count($this->mCollated)) { return "No profiling output\n"; } $this->close(); @@ -323,6 +323,8 @@ class Profiler { $fname = 'Profiler::logToDB'; $dbw = & wfGetDB(DB_MASTER); + if (!is_object($dbw)) + return false; $profiling = $dbw->tableName('profiling'); $name = substr($name, 0, 255); -- 2.20.1