ZF-12186: Zend_Text_MultiByte::strPad() Warning on Input Longer Than Pad Length


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."


Patch with unit test

Fixed in trunk (1.12.0): r24762 Fixed in release-1.11 (1.11.12): r24763