Document wfWarn() function
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 20 Aug 2009 21:35:22 +0000 (21:35 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Thu, 20 Aug 2009 21:35:22 +0000 (21:35 +0000)
includes/GlobalFunctions.php

index 8de5d9b..580b510 100644 (file)
@@ -3053,6 +3053,16 @@ function wfDeprecated( $function ) {
        }
 }
 
+/**
+ * Send a warning either to the debug log or in a PHP error depending on
+ * $wgDevelopmentWarnings
+ *
+ * @param $msg String: message to send
+ * @param $callerOffset Integer: number of itmes to go back in the backtrace to
+ *        find the correct caller (1 = function calling wfWarn, ...)
+ * @param $level Integer: PHP error level; only used when $wgDevelopmentWarnings
+ *        is true
+ */
 function wfWarn( $msg, $callerOffset = 1, $level = E_USER_NOTICE ) {
        $callers = wfDebugBacktrace();
        if( isset( $callers[$callerOffset+1] ) ){