Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Fix: 0017376: Perf: use sprintf over utf8_str_pad #182

wants to merge 1 commit into from

2 participants


No description provided.


Please amend your commit so that it reads "Fix #17376" (the key is the # before the bug number) so that the source integration plugin can pick it up.


I wonder if we should display # in the summary row in the bug tracker - as I just copy/pasted, and always forget to add the # :)

@grangeway grangeway closed this pull request from a commit
@grangeway grangeway 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 <>
@grangeway grangeway closed this in 0748f79
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 31, 2014
  1. @grangeway
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  core/bug_api.php
2  core/bug_api.php
@@ -2031,7 +2031,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 ) );
Something went wrong with that request. Please try again.