From c53c06f780e14055dc9e047a5bb69a7195dcf197 Mon Sep 17 00:00:00 2001 From: Octav Date: Wed, 14 Sep 2016 01:24:06 +0300 Subject: [PATCH] Fix Notice: Array to string conversion in Zend/Filter/StringTrim.php #711 --- library/Zend/Filter/StringTrim.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/library/Zend/Filter/StringTrim.php b/library/Zend/Filter/StringTrim.php index 4f86d89e2c..873a10379d 100644 --- a/library/Zend/Filter/StringTrim.php +++ b/library/Zend/Filter/StringTrim.php @@ -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; @@ -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 {