X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fdebug%2FMWDebug.php;h=e8778362ec49d77de57fb26b6476c510c56f83b4;hb=207543b255632bab4e29e3d76b743c5db369fe48;hp=2189498687703f1169e7d2744dc5518bf5b26431;hpb=cc0fe6c4a7cfad4dcecad5372c630d804914e4b2;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/debug/MWDebug.php b/includes/debug/MWDebug.php index 2189498687..e8778362ec 100644 --- a/includes/debug/MWDebug.php +++ b/includes/debug/MWDebug.php @@ -185,7 +185,7 @@ class MWDebug { * @param string $function Function that is deprecated. * @param string|bool $version Version in which the function was deprecated. * @param string|bool $component Component to which the function belongs. - * If false, it is assumbed the function is in MediaWiki core. + * If false, it is assumed the function is in MediaWiki core. * @param int $callerOffset How far up the callstack is the original * caller. 2 = function that called the function that called * MWDebug::deprecated() (Added in 1.20). @@ -349,12 +349,11 @@ class MWDebug { * @param string $function * @param bool $isMaster * @param float $runTime Query run time - * @return int ID number of the query to pass to queryTime or -1 if the - * debugger is disabled + * @return bool True if debugger is enabled, false otherwise */ public static function query( $sql, $function, $isMaster, $runTime ) { if ( !self::$enabled ) { - return -1; + return false; } // Replace invalid UTF-8 chars with a square UTF-8 character @@ -389,7 +388,7 @@ class MWDebug { 'time' => $runTime, ]; - return count( self::$query ) - 1; + return true; } /**