Osclass Support Forums

General osclass questions => Themes => Topic started by: Sinto001 on December 16, 2020, 12:55:49 PM

Title: Error message in the search term page
Post by: Sinto001 on December 16, 2020, 12:55:49 PM
Hi I tried the homepage search bar when I enter any search term and apply search I get these error message

Warning: Illegal string offset 'pk_i_id' in /home/u7xxxxxxxxxx/public_html/classifieds/oc-content/themes/bender/search-sidebar.php on line 23

Warning: Cannot assign an empty string to a string offset in /home/u7xxxxxxxx/public_html/classifieds/oc-content/themes/bender/search-sidebar.php on line 23

How to remove this message or apply a fix for it?
Title: Re: Error message in the search term page
Post by: MB Themes on December 16, 2020, 02:35:12 PM
Have you checked that file and line?
Title: Re: Error message in the search term page
Post by: Sinto001 on December 16, 2020, 03:12:55 PM
Have you checked that file and line?

I have checked but could not figure out. A snapshot is attached for line 23
Title: Re: Error message in the search term page
Post by: MB Themes on December 16, 2020, 08:32:24 PM
@Sinto001
I think you should change:
Code: [Select]
$category['pk_i_id'] = null;
into:
Code: [Select]
$category = array();
$category['pk_i_id'] = null;
Title: Re: Error message in the search term page
Post by: Sinto001 on December 16, 2020, 08:55:45 PM
@Sinto001
I think you should change:
Code: [Select]
$category['pk_i_id'] = null;
into:
Code: [Select]
$category = array();
$category['pk_i_id'] = null;
Thanks it corrected the error message.