Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
wants to merge 1 commit into from

2 participants

@grangeway

No description provided.

@dregad
Owner

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.

@grangeway

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 <dregad@mantisbt.org>
0748f79
@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
View
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.