Random Project

Bug when using 0 as expected result

Bug: When you use ‘0’ as expected result, you will always get status OK! Mentioned in first rating by mcouvran, February 17, 2011

You can use his workaround by adding 1 to the query (COUNT(*)+1) and adjusting your expected result accordingly, or:

To fix this, look for:
if ($querytype == “query” && isset($expected_result)) {
Replace it with:
if ($querytype == “query” && (!empty($expected_result) || $expected_result == 0)) {