Page 1 of 1

Fatal error: Uncaught Error after clicking the search button

Posted: Wed Apr 17, 2019 4:08 pm
by technicalplay
Putting anything in the search field and then clicking on the "Red Search" button on the home page I get this Fatal Error below. However, if you first click on the Refine Search button and fill out a few of the fields and then click the Red button no bugs!

Code: Select all

[17-Apr-2019 18:00:15 Europe/Madrid] PHP Fatal error: Uncaught Error: Call to a member function numRows() on boolean in /home/givemeke/public_html/oc-includes/osclass/model/Category.php:127
Stack trace:
#0 /home/givemeke/public_html/oc-content/themes/shopclass/includes/core-functions.php(393): Category->listWhere('fk_i_parent_id=...')
#1 /home/givemeke/public_html/oc-content/themes/shopclass/search_sidebar.php(155): tfc_get_subcat(NULL)
#2 /home/givemeke/public_html/oc-includes/osclass/helpers/hDefines.php(238): require('/home/givemeke/...')
#3 /home/givemeke/public_html/oc-content/themes/shopclass/search.php(109): osc_current_web_theme_path('search_sidebar....')
#4 /home/givemeke/public_html/oc-includes/osclass/helpers/hDefines.php(238): require('/home/givemeke/...')
#5 /home/givemeke/public_html/oc-includes/osclass/controller/search.php(620): osc_current_web_theme_path('search.php')
#6 /home/givemeke/public_html/oc-includes/osclass/controller/search.php(572): CWebSearch->doView('search.php')
#7 /home/givemeke/public_html/index.php(102): CWebSearch->doModel()
# in /home/givemeke/public_html/oc-includes/osclass/model/Category.php on line 127

Re: Fatal error: Uncaught Error after clicking the search button

Posted: Thu Apr 18, 2019 12:34 pm
by tuffadmin

Re: Fatal error: Uncaught Error after clicking the search button

Posted: Thu Apr 18, 2019 4:35 pm
by technicalplay
I applied that fix and no more fatal error! So what I did was applied that code to the file core-functions.php. And was I supposed to create another file called "tfc_get_subcat.php" and put that same code inside of it?

So now I only get this notice:

Code: Select all

[18-Apr-2019 18:34:45 Europe/Madrid] PHP Notice: Undefined offset: 0 in /home/givemeke/public_html/oc-content/themes/shopclass/includes/core-functions.php on line 618

Re: Fatal error: Uncaught Error after clicking the search button

Posted: Thu Apr 18, 2019 4:51 pm
by tuffadmin
You did right, PHP notice are not errors, they are fine for time till the next version.