Index: library/Zend/Filter/StringTrim.php =================================================================== --- library/Zend/Filter/StringTrim.php (revision 23347) +++ library/Zend/Filter/StringTrim.php (working copy) @@ -48,11 +48,11 @@ * @param string|array|Zend_Config $charList * @return void */ - public function __construct($charList = null) + public function __construct($options = null) { - if ($charList instanceof Zend_Config) { - $charList = $charList->toArray(); - } else if (!is_array($charList)) { + if ($options instanceof Zend_Config) { + $options = $options->toArray(); + } else if (!is_array($options)) { $options = func_get_args(); $temp['charlist'] = array_shift($options); $options = $temp; Index: tests/Zend/Filter/StringTrimTest.php =================================================================== --- tests/Zend/Filter/StringTrimTest.php (revision 23347) +++ tests/Zend/Filter/StringTrimTest.php (working copy) @@ -120,4 +120,19 @@ public function testZF7902() { $this->assertEquals('/', $this->_filter->filter('/')); - }} + } + + /** + * @group ZF-10691 + */ + public function testSetParamCharListToConstructor() + { + require_once 'Zend/Config.php'; + $config = new Zend_Config(array('charlist' => '&')); + $filter = new Zend_Filter_StringTrim($config); + $this->assertEquals('&', $filter->getCharList()); + + $filter = new Zend_Filter_StringTrim('&'); + $this->assertEquals('&', $filter->getCharList()); + } +}