[Skip to main content](#vessel-content)

#   Warning trim() expects parameter 1 to be string, array given in

##

- **[marto42](/forum/user/38319-marto42 "View marto42's Profile")**
- [![marto42's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38319-marto42 "View marto42's Profile") Topic Author
- [ Offline](/forum/user/38319-marto42)

Less More

- Posts: 42
- Thank you received: 1
-
-

5 years 4 days ago [\#337613](#337613) by [marto42](/forum/user/38319-marto42 "View marto42's Profile")  *[Warning trim() expects parameter 1 to be string, array given in](/forum/36-reports-statistics/903593-warning-trim-expects-parameter-1-to-be-string-array-given-in#337613 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 3.10.3 -- PHP version -- : 7.3 -- Browser(s) name and version -- : chrome 96.0.4664.45 -- Error-message(debug-mod must be tuned on) -- : Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Hello, in default mode in Joomla a saw a fowolling warning: 0 Warning: trim() expects parameter 1 to be string, array given in ...........  I&#96;ve donwloading the filter.php file and scrol down to 67 row. Here are the code at the rows 67,68,69:  if(!empty($data) &amp;&amp; !in&#95;array(trim($data), array('', 'none', '::'))) { $filter-&gt;filterActive = true; $filterActivated = true;  WHAT CAN I DO TO FIX THE WARNING IN DEFAULT JOOMLA MODE TO DISSAPEAR THE WARNING? Is the code below right?  if(!empty($data) &amp;&amp; !in&#95;array(trim($data), array('', 'none', '::'))) { $filter-&gt;filterActive = false; $filterActivated = false;")* was created by *[marto42](/forum/user/38319-marto42 "View marto42's Profile")*

-- HikaShop version -- : 4.4.4
-- Joomla version -- : 3.10.3
-- PHP version -- : 7.3
-- Browser(s) name and version -- : chrome 96.0.4664.45
-- Error-message(debug-mod must be tuned on) -- : Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public_html/components/com_hikashop/views/product/tmpl/filter.php on line 67

Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public_html/components/com_hikashop/views/product/tmpl/filter.php on line 67

Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public_html/components/com_hikashop/views/product/tmpl/filter.php on line 67

Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public_html/components/com_hikashop/views/product/tmpl/filter.php on line 67

Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public_html/components/com_hikashop/views/product/tmpl/filter.php on line 67

Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public_html/components/com_hikashop/views/product/tmpl/filter.php on line 67

Hello, in default mode in Joomla a saw a fowolling warning:
0
Warning: trim() expects parameter 1 to be string, array given in ...........

I&#96;ve donwloading the filter.php file and scrol down to 67 row. Here are the code at the rows 67,68,69:

if(!empty($data) &amp;&amp; !in_array(trim($data), array('', 'none', '::'))) {
$filter-&gt;filterActive = true;
$filterActivated = true;

WHAT CAN I DO TO FIX THE WARNING IN DEFAULT JOOMLA MODE TO DISSAPEAR THE WARNING?
Is the code below right?

if(!empty($data) &amp;&amp; !in_array(trim($data), array('', 'none', '::'))) {
$filter-&gt;filterActive = false;
$filterActivated = false;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM2LXJlcG9ydHMtc3RhdGlzdGljcy85MDM1OTMtd2FybmluZy10cmltLWV4cGVjdHMtcGFyYW1ldGVyLTEtdG8tYmUtc3RyaW5nLWFycmF5LWdpdmVuLWluP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

5 years 3 days ago [\#337617](#337617) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Warning trim() expects parameter 1 to be string, array given in](/forum/36-reports-statistics/903593-warning-trim-expects-parameter-1-to-be-string-array-given-in#337617 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 3.10.3 -- PHP version -- : 7.3 -- Browser(s) name and version -- : chrome 96.0.4664.45 -- Error-message(debug-mod must be tuned on) -- : Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Hello, in default mode in Joomla a saw a fowolling warning: 0 Warning: trim() expects parameter 1 to be string, array given in ...........  I&#96;ve donwloading the filter.php file and scrol down to 67 row. Here are the code at the rows 67,68,69:  if(!empty($data) &amp;&amp; !in&#95;array(trim($data), array('', 'none', '::'))) { $filter-&gt;filterActive = true; $filterActivated = true;  WHAT CAN I DO TO FIX THE WARNING IN DEFAULT JOOMLA MODE TO DISSAPEAR THE WARNING? Is the code below right?  if(!empty($data) &amp;&amp; !in&#95;array(trim($data), array('', 'none', '::'))) { $filter-&gt;filterActive = false; $filterActivated = false;")*

Hi,

Thank you for your feedback. The code there has indeed a problem because for some types of filters $data can be an array. So the check there should be a bit more complex.
I've made a patch on our end for this.
Download again the install package of HikaShop on our website and install it on yours and it will fix the problem.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM2LXJlcG9ydHMtc3RhdGlzdGljcy85MDM1OTMtd2FybmluZy10cmltLWV4cGVjdHMtcGFyYW1ldGVyLTEtdG8tYmUtc3RyaW5nLWFycmF5LWdpdmVuLWluP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[marto42](/forum/user/38319-marto42 "View marto42's Profile")**
- [![marto42's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38319-marto42 "View marto42's Profile") Topic Author
- [ Offline](/forum/user/38319-marto42)

Less More

- Posts: 42
- Thank you received: 1
-
-

5 years 3 days ago -  5 years 3 days ago [\#337635](#337635) by [marto42](/forum/user/38319-marto42 "View marto42's Profile")  Replied by *[marto42](/forum/user/38319-marto42 "View marto42's Profile")* on topic *[Warning trim() expects parameter 1 to be string, array given in](/forum/36-reports-statistics/903593-warning-trim-expects-parameter-1-to-be-string-array-given-in#337635 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 3.10.3 -- PHP version -- : 7.3 -- Browser(s) name and version -- : chrome 96.0.4664.45 -- Error-message(debug-mod must be tuned on) -- : Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Hello, in default mode in Joomla a saw a fowolling warning: 0 Warning: trim() expects parameter 1 to be string, array given in ...........  I&#96;ve donwloading the filter.php file and scrol down to 67 row. Here are the code at the rows 67,68,69:  if(!empty($data) &amp;&amp; !in&#95;array(trim($data), array('', 'none', '::'))) { $filter-&gt;filterActive = true; $filterActivated = true;  WHAT CAN I DO TO FIX THE WARNING IN DEFAULT JOOMLA MODE TO DISSAPEAR THE WARNING? Is the code below right?  if(!empty($data) &amp;&amp; !in&#95;array(trim($data), array('', 'none', '::'))) { $filter-&gt;filterActive = false; $filterActivated = false;")*

Hello, I&#96;ve diwnloaded and installed on my web site the new release, but still seen other error in the same filter php file:
Notice: Undefined offset: 1 in /home/matrivub/public_html/administrator/components/com_hikashop/classes/filter.php on line 882

and other

Notice: Undefined offset: 1 in /home/matrivub/public_html/administrator/components/com_hikashop/classes/filter.php on line 899

Last edit: 5 years 3 days ago by [marto42](/forum/user/38319-marto42 "View marto42's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM2LXJlcG9ydHMtc3RhdGlzdGljcy85MDM1OTMtd2FybmluZy10cmltLWV4cGVjdHMtcGFyYW1ldGVyLTEtdG8tYmUtc3RyaW5nLWFycmF5LWdpdmVuLWluP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

5 years 3 days ago [\#337641](#337641) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Warning trim() expects parameter 1 to be string, array given in](/forum/36-reports-statistics/903593-warning-trim-expects-parameter-1-to-be-string-array-given-in#337641 "-- HikaShop version -- : 4.4.4 -- Joomla version -- : 3.10.3 -- PHP version -- : 7.3 -- Browser(s) name and version -- : chrome 96.0.4664.45 -- Error-message(debug-mod must be tuned on) -- : Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Warning: trim() expects parameter 1 to be string, array given in /home/matrivub/public&#95;html/components/com&#95;hikashop/views/product/tmpl/filter.php on line 67  Hello, in default mode in Joomla a saw a fowolling warning: 0 Warning: trim() expects parameter 1 to be string, array given in ...........  I&#96;ve donwloading the filter.php file and scrol down to 67 row. Here are the code at the rows 67,68,69:  if(!empty($data) &amp;&amp; !in&#95;array(trim($data), array('', 'none', '::'))) { $filter-&gt;filterActive = true; $filterActivated = true;  WHAT CAN I DO TO FIX THE WARNING IN DEFAULT JOOMLA MODE TO DISSAPEAR THE WARNING? Is the code below right?  if(!empty($data) &amp;&amp; !in&#95;array(trim($data), array('', 'none', '::'))) { $filter-&gt;filterActive = false; $filterActivated = false;")*

Hi,

Well it's another notice message in another file and I didn't know about it so that's why it's still there.
I've added a patch for Code:

Notice: Undefined offset: 1 in /home/matrivub/public_html/administrator/components/com_hikashop/classes/filter.php on line 899

Download again the install package of HikaShop on our website and install it on yours and it will fix the problem.

However, for the Code:

Notice: Undefined offset: 1 in /home/matrivub/public_html/administrator/components/com_hikashop/classes/filter.php on line 882

I don't see why you would get that message. Could you double check ? What do you have on that line of code in that file on your end ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM2LXJlcG9ydHMtc3RhdGlzdGljcy85MDM1OTMtd2FybmluZy10cmltLWV4cGVjdHMtcGFyYW1ldGVyLTEtdG8tYmUtc3RyaW5nLWFycmF5LWdpdmVuLWluP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.064 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
