#38969PHP Warning: str_pad() expects parameter 2 to be long, string given
Description
Core: Error handler (FE): PHP Warning: str_pad() expects parameter 2 to be long, string given in /Users/peter/Sites/typo3_src-4.5.17/typo3/sysext/cms/tslib/class.tslib_content.php line 3588
only php 5.3.
PHP: string str_pad ( string $input , int $pad_length ….) 2. option should be a integer.
function prefixComment($str, $conf, $content) {
$parts = explode(‘|’, $str);
$output = LF . str_pad(‘’, $parts0, TAB) . …..
…
}
$parts[0] is interpreted as string. when i add a type cast the warning disappears:
$output = LF . str_pad(‘’, (int)$parts0, TAB) . …..