Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.9.7
-
Fix Version/s: 1.10.0
-
Component/s: Zend_Filter
-
Labels:None
Description
Zend_Filter_StringTrim no longer works (i just upgraded from 1.7.3) when the string you wish to trim is '/'.
I get this warning and Zend_Filter_StringTrim::filter returns 0
Warning: preg_replace() [function.preg-replace]: Unknown modifier ']' in Zend/Filter/StringTrim.php on line 112
How to replicate:
$stringTrim = new Zend_Filter_StringTrim('/');
$stringTrim->filter('/some/uri/here/');
Attachments
Issue Links
| This issue is duplicated by: | ||||
| ZF-8782 | Zend_Filter_StringTrim does not work when trim string is '/' |
|
|
|
The issue is caused by the forward slash also being the delimiter in the regular expression used. I've prepared a patch that escapes the forward slash properly.