From b455e43276f2f47f364ae73a5122fb153933f593 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 29 Aug 2012 21:36:37 +0200 Subject: [PATCH] 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 --- includes/GlobalFunctions.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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'] ) ? -- 2.20.1