API: Fix profiling errors caused by calling wfProfileClose() from dieUsage()
authorRoan Kattouw <catrope@users.mediawiki.org>
Fri, 23 Jan 2009 20:23:34 +0000 (20:23 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Fri, 23 Jan 2009 20:23:34 +0000 (20:23 +0000)
includes/api/ApiBase.php

index 06abc3c..8afaae1 100644 (file)
@@ -635,6 +635,7 @@ abstract class ApiBase {
         * Call main module's error handler
         */
        public function dieUsage($description, $errorCode, $httpRespCode = 0) {
+               wfProfileClose();
                throw new UsageException($description, $this->encodeParamName($errorCode), $httpRespCode);
        }