villameschik wrote: ↑Thu May 13, 2021 4:01 pm
ecartz wrote: ↑Thu May 13, 2021 1:00 pm
villameschik wrote: ↑Thu May 13, 2021 6:00 am
line 390: return $faq['faq_question'];
line 399: return $faq['faq_answer'];
My guess would be a data level problem. The equivalent of the previous suggestion would be to write
Code: Select all
if (isset($faq['faq_question'])) {
return $faq['faq_question'];
}
Code: Select all
if (isset($faq['faq_answer'])) {
return $faq['faq_answer'];
}
However, I suspect that there is some kind of problem with the database query. For example, if it is requesting a FAQ that isn't there.
Thanks @ecartz for help, what should I do with the database query problem?
sorry for the trouble @ecartz, but making this change gives me this error:
Parse error: syntax error, unexpected end of file in xxx/admin/faq.php on line 403
if (isset($faq['faq_question'])) {
return $faq['faq_question'];
}
function tep_get_faq_answer($faq_id, $language_id = 0) {
global $languages_id;
if ($language_id == 0) $language_id = $languages_id;
$faq_query = tep_db_query("select faq_answer from clubosc_faq_info where faq_id = '" . (int)$faq_id . "' and language_id = '" . (int)$language_id . "'");
$faq = tep_db_fetch_array($faq_query);
if (isset($faq['faq_answer'])) {
return $faq['faq_answer'];
}
?>
I had my hosting checked and they tell me that MYSQL works perfectly.