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
* 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;
}
/**
* Return a string representation of frame
*
* @param $frame Array
- * @return Bool
+ * @return string
*/
function wfFormatStackFrame( $frame ) {
return isset( $frame['class'] ) ?