Skip to content

Commit

Permalink
Merge pull request #22 from c9s/numformat-fix
Browse files Browse the repository at this point in the history
Numformat fix -- only run through callback if the value is numeric
  • Loading branch information
billf committed Apr 9, 2013
2 parents 3425f7f + e56774c commit 254eb24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xhprof_lib/display/xhprof.php
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@ function print_td_num($num, $fmt_func, $bold=false, $attributes=null) {

$class = get_print_class($num, $bold);

if (!empty($fmt_func)) {
if (!empty($fmt_func) && is_numeric($num) ) {
$num = call_user_func($fmt_func, $num);
}

Expand Down

0 comments on commit 254eb24

Please sign in to comment.