File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -170,8 +170,14 @@ public function generate(
170
170
continue ;
171
171
}
172
172
173
- $ line = str_repeat (' ' , (5 - strlen ($ count ))).$ count ;
174
- echo ' ' .$ source .str_repeat (' ' , ($ width - 14 - strlen ($ source ))).$ line .PHP_EOL ;
173
+ $ line = str_repeat (' ' , (5 - strlen ($ count ))).$ count ;
174
+ $ padding = ($ width - 14 - strlen ($ source ));
175
+ if ($ padding < 0 ) {
176
+ $ source = substr ($ source , 0 , ($ padding - 3 )).'... ' ;
177
+ $ padding = 0 ;
178
+ }
179
+
180
+ echo ' ' .$ source .str_repeat (' ' , $ padding ).$ line .PHP_EOL ;
175
181
}
176
182
}
177
183
}//end foreach
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ http://pear.php.net/dtd/package-2.0.xsd">
41
41
-- Thanks to Maksim Kochkin for the patch
42
42
- Fixed bug #20097 : CLI.php throws error in php 5.2
43
43
- Fixed bug #20100 : incorrect Function mysql() has been deprecated report
44
+ - Fixed bug #20119 : PHP warning: invalid argument to str_repeat() in SVN blame report with -s
44
45
- Fixed bug #20123 : PSR2 complains about an empty second statement in for-loop
45
46
- Fixed bug #20131 : PHP errors in svnblame report, if there are files not under version control
46
47
</notes >
You can’t perform that action at this time.
0 commit comments