From 4d2ccdcfddba142a2c10a294fdcc5f466d6c3668 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 20 Aug 2009 21:35:22 +0000 Subject: [PATCH] Document wfWarn() function --- includes/GlobalFunctions.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 8de5d9b11d..580b510b07 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -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] ) ){ -- 2.20.1