This change is wrong, it will make sphinx queries that return empty results not be part of the cache conditions (it makes the function skip the call to kApiCache::addSqlQueryCondition). I think it should be if (is_null($result)) return false since fetchAll returns null in case of an error, and SphinxCriteria will receive the false value and throw an exception