Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
680 views
in Plugins by

If I run qa_db_read_one_assoc on a query having no results, I get this fatal error:

Question2Answer fatal error:

Reading one assoc from empty results

Stack trace:

require() [path]/index.php:31
require() [path]/qa-include/qa-index.php:163
qa_get_request_content() [path]/qa-include/qa-page.php:755
require() [path]/qa-include/qa-page.php:200
process_request() [path]/qa-include/qa-page-default.php:110
qa_db_read_one_assoc() [path]/qa-plugin/edit-history/qa-edh-revisions.php:48

Is there a way to prevent this? Shouldn't the function simply return null? I don't see any Q2A functions for getting the number of rows returned or anything.

Q2A version: 1.5.2

1 Answer

0 votes
by
See the second, optional, parameter :)
by
And thanks, somehow I missed the second parameter.
...