Skip to content
Browse files

Fix #17376: Perf: use sprintf over utf8_str_pad

Patch from grangeway's original pull request [1].

[1] fixes #182

Signed-off-by: Damien Regad <dregad@mantisbt.org>
  • Loading branch information...
1 parent 6905d59 commit 0748f79a35212197a03a0b2befd8eae80bc35370 @grangeway grangeway committed with dregad
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/bug_api.php
View
2 core/bug_api.php
@@ -2030,7 +2030,7 @@ function bug_unmonitor( $p_bug_id, $p_user_id ) {
*/
function bug_format_id( $p_bug_id ) {
$t_padding = config_get( 'display_bug_padding' );
- $t_string = utf8_str_pad( $p_bug_id, $t_padding, '0', STR_PAD_LEFT );
+ $t_string = sprintf('%0' . (int)$t_padding . 'd', $p_bug_id);
return event_signal( 'EVENT_DISPLAY_BUG_ID', $t_string, array( $p_bug_id ) );
}

0 comments on commit 0748f79

Please sign in to comment.
Something went wrong with that request. Please try again.