Update query.php

Fix for "Undefined offset error" from the orm auth package.