ZF-12186: Zend_Text_MultiByte::strPad() Warning on Input Longer Than Pad Length
Description
Zend_Text_MultiByte::strPad() gives a warning when pad_length is negative or less than input string. Results in a warning "str_repeat(): Second argument has to be greater than or equal to 0" and returns the input string.
Return value is as expected but should not give a warning.
From str_pad() doc page: "If the value of pad_length is negative, less than, or equal to the length of the input string, no padding takes place."
Comments
Posted by Robert Purcell (robertology) on 2012-05-04T21:33:05.000+0000
Patch with unit test
Posted by Adam Lundrigan (adamlundrigan) on 2012-05-06T00:11:22.000+0000
Fixed in trunk (1.12.0): r24762 Fixed in release-1.11 (1.11.12): r24763