mongodb/mongo-php-driver — pull request #252 by derickr (2012-12-14 09:50:17+00:00)
Title: Fixed PHP-640: Node selection with secondaryPreferred read preferences.

If we prefer a secondary, then we need to ignore the last item from the list,
as this is the primary node - but only if there is more than one node in the
list AND the last node in the list is a primary.