From: Alexandre Emsenhuber Date: Wed, 29 Aug 2012 19:36:37 +0000 (+0200) Subject: Fix wfGetCaller() and wfFormatStackFrame() documentation X-Git-Tag: 1.31.0-rc.0~22544 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/Category:Foo?a=commitdiff_plain;h=b455e43276f2f47f364ae73a5122fb153933f593;p=lhc%2Fweb%2Fwiklou.git Fix wfGetCaller() and wfFormatStackFrame() documentation These two functions cannot return a boolean. Also simplified wfGetCaller() to not use the $caller local variable which is totally useless in that case. Change-Id: I81707a8292afc1829921b58cdaae81b3147ee3cb --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 4ff258d2d5..84cdeea4b5 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1879,16 +1879,15 @@ function wfBacktrace() { * wfGetCaller( 3 ) is the parent of that. * * @param $level Int - * @return Bool|string + * @return string */ function wfGetCaller( $level = 2 ) { $backtrace = wfDebugBacktrace( $level + 1 ); if ( isset( $backtrace[$level] ) ) { return wfFormatStackFrame( $backtrace[$level] ); } else { - $caller = 'unknown'; + return 'unknown'; } - return $caller; } /** @@ -1912,7 +1911,7 @@ function wfGetAllCallers( $limit = 3 ) { * Return a string representation of frame * * @param $frame Array - * @return Bool + * @return string */ function wfFormatStackFrame( $frame ) { return isset( $frame['class'] ) ?