2017/06/06 09:41:54 [error] 906#906: *94496 FastCGI sent in stderr: "PHP message: PHP Warning: Illegal string offset 'type' in /home/public_html/app/addons/discussion/func.php on line 380
2017/06/06 09:41:54 [error] 906#906: *94496 FastCGI sent in stderr: "PHP message: PHP Warning: Illegal string offset 'type' in /home/public_html/app/addons/discussion/func.php on line 380
Thanks - That did fix that line error but after I implement your code I got another WARNING on line 383
$rating = db_get_field("SELECT AVG(a.rating_value) as val FROM ?:discussion_rating as a LEFT JOIN ?:discussion_posts as b ON a.post_id = b.post_id WHERE a.thread_id = ?i AND b.status = 'A' AND a.rating_value > ?i", $discussion['thread_id'], 0);
Thanks - That did fix that line error but after I implement your code I got another WARNING on line 383
$rating = db_get_field("SELECT AVG(a.rating_value) as val FROM ?:discussion_rating as a LEFT JOIN ?:discussion_posts as b ON a.post_id = b.post_id WHERE a.thread_id = ?i AND b.status = 'A' AND a.rating_value > ?i", $discussion['thread_id'], 0);
Make it as follows:
$rating = 0;
if (!empty($discussion[‘thread_id’])) {
$rating = db_get_field(“SELECT AVG(a.rating_value) as val FROM ?:discussion_rating as a LEFT JOIN ?:discussion_posts as b ON a.post_id = b.post_id WHERE a.thread_id = ?i AND b.status = ‘A’ AND a.rating_value > ?i”, $discussion[‘thread_id’], 0);
}