From: Domas Mituzas Date: Fri, 30 Dec 2005 23:13:31 +0000 (+0000) Subject: * Print profiling with stack empty but collated list full X-Git-Tag: 1.6.0~836 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=a0cae0b5750bdd40daec9fa15e0fe8bc9cebdae2;p=lhc%2Fweb%2Fwiklou.git * Print profiling with stack empty but collated list full * Silently ignore DB writes if db is unreachable --- 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);