Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.

Commit

Permalink
Fix Notice: Array to string conversion in Zend/Filter/StringTrim.php z…
Browse files Browse the repository at this point in the history
  • Loading branch information
tavy315 committed Sep 13, 2016
1 parent ba7d7f8 commit c53c06f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions library/Zend/Filter/StringTrim.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,12 @@ class Zend_Filter_StringTrim implements Zend_Filter_Interface
* Sets filter options
*
* @param string|array|Zend_Config $options
* @return void
*/
public function __construct($options = null)
{
if ($options instanceof Zend_Config) {
$options = $options->toArray();
} else if (!is_array($options)) {
} elseif (!is_array($options)) {
$options = func_get_args();
$temp['charlist'] = array_shift($options);
$options = $temp;
Expand Down Expand Up @@ -95,6 +94,9 @@ public function setCharList($charList)
*/
public function filter($value)
{
if (!is_string($value)) {
return $value;
}
if (null === $this->_charList) {
return $this->_unicodeTrim((string) $value);
} else {
Expand Down

0 comments on commit c53c06f

Please sign in to comment.