Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.10.1
-
Fix Version/s: 1.10.2
-
Component/s: Zend_Filter
-
Labels:None
Description
Extending Zend_Filter_PregReplace like the following code will throw fatal error "does not have a valid MatchPattern set". Passing null as options to the constrcutor should not set matchPattern property to NULL, while this property is set in the child class
require_once 'Zend/Filter/PregReplace.php'; class Ms_View_Filter_LinkArrows extends Zend_Filter_PregReplace{ /** * Pattern to match * @var mixed */ protected $_matchPattern = array('~(>){3,}~i'); /** * Replacement pattern * @var mixed */ protected $_replacement = '<i class="arrow-next"> </i>'; }
Attached the patch, after I will attach the file with unit tests.