null query error

Still trying to trace null query error. debug_backtrace pointed to this
line.
Still have debug code in query.php to write out to error log if a null
query is passed.