Fix sphinxapi.php query assertion error