- Posts: 42
- Thank you received: 1
Warning trim() expects parameter 1 to be string, array given in
4 years 10 months ago #337613
by marto42
-- 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`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) && !in_array(trim($data), array('', 'none', '::'))) {
$filter->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) && !in_array(trim($data), array('', 'none', '::'))) {
$filter->filterActive = false;
$filterActivated = false;
-- 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`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) && !in_array(trim($data), array('', 'none', '::'))) {
$filter->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) && !in_array(trim($data), array('', 'none', '::'))) {
$filter->filterActive = false;
$filterActivated = false;
Please Log in or Create an account to join the conversation.
4 years 10 months ago #337617
by nicolas
Replied by nicolas on topic Warning trim() expects parameter 1 to be string, array given in
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.
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 or Create an account to join the conversation.
4 years 10 months ago - 4 years 10 months ago #337635
by marto42
Replied by marto42 on topic Warning trim() expects parameter 1 to be string, array given in
Hello, I`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
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: 4 years 10 months ago by marto42.
Please Log in or Create an account to join the conversation.
4 years 10 months ago #337641
by nicolas
Replied by nicolas on topic Warning trim() expects parameter 1 to be string, array given in
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
Download again the install package of HikaShop on our website and install it on yours and it will fix the problem.
However, for the
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 ?
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
However, for the
Code:
Notice: Undefined offset: 1 in /home/matrivub/public_html/administrator/components/com_hikashop/classes/filter.php on line 882
Please Log in or Create an account to join the conversation.
Time to create page: 0.184 seconds