Index: library/Zend/Filter/PregReplace.php =================================================================== --- library/Zend/Filter/PregReplace.php (revision 21072) +++ library/Zend/Filter/PregReplace.php (working copy) @@ -89,18 +89,19 @@ if ($options instanceof Zend_Config) { $options = $options->toArray(); } else if (!is_array($options)) { - $options = func_get_args(); - $temp['match'] = array_shift($options); + $options = func_get_args(); + $temp = array(); if (!empty($options)) { + $temp['match'] = array_shift($options); $temp['replace'] = array_shift($options); } $options = $temp; } - + if (array_key_exists('match', $options)) { $this->setMatchPattern($options['match']); } - + if (array_key_exists('replace', $options)) { $this->setReplacement($options['replace']); }