ZF-9204: Filter Word_CamelCaseToSeparator pattern


the filter Zend_Filter_Word_CamelCaseToSeparator has a bug in the pattern:

$oFilter = new Zend_Filter_Word_CamelCaseToUnderscore(); $sCalcStr = $oFilter->filter('PaTitle'); echo "Input: PaTitle Expected: Pa_Title Result: $sCalcStr\r\n";

$sCalcStr = $oFilter->filter('Pa2Title');
echo "Input: Pa2Title Expected: Pa2_Title Result: $sCalcStr\r\n";

$sCalcStr = $oFilter->filter('P2aTitle');
echo "Input: P2aTitle Expected: P2a_Title Result: $sCalcStr\r\n";

Will result in: Input: PaTitle Expected: Pa_Title Result: Pa_Title Input: Pa2Title Expected: Pa2_Title Result: Pa2Title Input: P2aTitle Expected: P2a_Title Result: P2a_Title

I dont know if this bug also occours in a unicode supported environment or that it might even be expected behavior.


Fixed with r21089