Make sure number_format_i18n() is available before calling it in timer_stop(). fixes #5016

git-svn-id: https://develop.svn.wordpress.org/trunk@6139 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2007-09-19 20:48:34 +00:00
parent 6406e9bbeb
commit c782de1531

View File

@ -88,7 +88,7 @@ function timer_stop($display = 0, $precision = 3) { //if called like timer_stop(
$mtime = $mtime[1] + $mtime[0]; $mtime = $mtime[1] + $mtime[0];
$timeend = $mtime; $timeend = $mtime;
$timetotal = $timeend-$timestart; $timetotal = $timeend-$timestart;
$r = number_format_i18n($timetotal, $precision); $r = ( function_exists('number_format_i18n') ) ? number_format_i18n($timetotal, $precision) : number_format($timetotal, $precision);
if ( $display ) if ( $display )
echo $r; echo $r;
return $r; return $r;