Hello teddydoors,
Function qa_db_query_sub can return either TRUE or a mysqli_result object; therefore, the following conditional statement
if (!empty($resultz)) {
is always true. This error can be fixed by rewritting the code like this:
$resultz = qa_db_read_one_value(qa_db_query_sub(
'SELECT content FROM ^tagmetas WHERE title="title" AND tag=$',
qa_html($tag)
), true);
if (!empty($resultz)) {
$qa_content['title'] = qa_lang_html_sub('main/questions_tagged_x', $resultz);
}
else
{$qa_content['title'] = qa_lang_html_sub('main/questions_tagged_x', qa_html($tag));}
Here's what the documentation says about function qa_db_read_one_value (emphasis mine):
qa_db_read_one_value($result, $allowempty) returns the first column of the first row in the PHP $result resource. Set $allowempty to true if an empty result should not cause a fatal Q2A error.
I hope it works for you.