Fixed PHP-1088: CID-10700: Explicit null dereferenced
Merge pull request #693 from bjori/PHP-1088-gridfs-coverity

Fixed PHP-1088: CID-10700: Explicit null dereferenced

* bjori/PHP-1088-gridfs-coverity:
  Fixed PHP-1088: CID-10700: Explicit null dereferenced
Merge remote-tracking branch 'upstream/v1.5'

* upstream/v1.5:
  Fixed PHP-1088: CID-10700: Explicit null dereferenced
Fixed PHP-1090: Dereference null return value

Fixes several coverity issues around php_mongo_runcommand() retval changes
that was introduced by the fix for PHP-1036 (1831821f69d87f2ea0b7f0eb16ca8a750d4ecc85)
Merge pull request #692 from bjori/coverity-runcommand

Fixed several coverity issues around php_mongo_runcommand() retval changes

* bjori/coverity-runcommand:
  Fixed PHP-1090: Dereference null return value
Merge remote-tracking branch 'upstream/v1.5'

* upstream/v1.5:
  Fixed PHP-1090: Dereference null return value
Fixed PHP-1086: Inserting documents with WriteConcern during failover broken

This is already covered by tests/replicaset-failover/mongocollection-insert-001.phpt
But as the failover testscases are so slow we only run them on Jenkins which is
why this wasn't discovered earlier

We don't actually support w=-1 (ignore socket errors) so we do want to throw exception
here in all cases
Merge pull request #691 from bjori/PHP-1086-failure-with-w1-should-throw-exception

Fixed PHP-1086: Inserting documents with WriteConcern during failover br...

* bjori/PHP-1086-failure-with-w1-should-throw-exception:
  Fixed PHP-1086: Inserting documents with WriteConcern during failover broken
Merge remote-tracking branch 'upstream/v1.5'

* upstream/v1.5:
  Fixed PHP-1086: Inserting documents with WriteConcern during failover broken
This is the v1.5 branch, not master
Fix branch name
Merge pull request #690 from bjori/readme-branch

Branch name fixes

* bjori/readme-branch:
  Fix branch name
  This is the v1.5 branch, not master
Merge remote-tracking branch 'upstream/v1.5'

* upstream/v1.5:
  Fix branch name
  This is the v1.5 branch, not master
Fix branch name
Fixed PHP-978: Standalone connection to arbiter fails
Improve tests by adding one for replicaset connection to arbiter node

I've removed the logs for the first connection search, as this is basically
random. The code for it (in php_mongo_connect) has as comment:

   /* We don't care about the result so although we assign it to a var, we
    * only do that to handle errors and return it so that the calling function
    * knows whether a connection could be obtained or not. */

The new test also illustrates that it works just fine connecting to the arbiter
node in replicaset connection mode.
Make sure we can talk to an arbiter with the rest of the nodes down.

It's near impossible to make a reliable automated test for this. I've tested
the following manually:

- make servers
- put all the secondary nodes in recovery mode with replSetMaintenance: 1
- step down the primary
- put the remaining (now secondary node) in recovery mode

Then requesting a standalone connection to the arbiter, or a replicaset
connection to the arbiter work just fine. Of course, upon writing I get a "not
master" error (which apparently changed code in 2.6 from 10058 to 100).
Added another test case.

This test case shows that even with the connection being made against an
arbiter with MONGO_RP_ANY, the read preferences are correctly respected for
normal queries (write, and read).
Merged pull request #689
Merge branch 'v1.5'