From db9aac9229f714fc0beef22f1a2b31fb3c4b97f2 Mon Sep 17 00:00:00 2001 From: Martin Keckeis Date: Wed, 30 Oct 2013 11:08:21 +0100 Subject: [PATCH] Update MongoDB.php --- library/Zend/Log/Writer/MongoDB.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/Zend/Log/Writer/MongoDB.php b/library/Zend/Log/Writer/MongoDB.php index 7366398ae41..1725ce53dc3 100644 --- a/library/Zend/Log/Writer/MongoDB.php +++ b/library/Zend/Log/Writer/MongoDB.php @@ -55,7 +55,7 @@ public function __construct($mongo, $database = null, $collection = null, array } if (is_array($mongo)) { parent::__construct($mongo); - $saveOptions = isset($mongo['save_options']) ? $mongo['save_options'] : null; + $saveOptions = isset($mongo['save_options']) ? $mongo['save_options'] : array(); $collection = isset($mongo['collection']) ? $mongo['collection'] : null; $database = isset($mongo['database']) ? $mongo['database'] : null; $mongo = isset($mongo['mongo']) ? $mongo['mongo'] : null; @@ -74,10 +74,10 @@ public function __construct($mongo, $database = null, $collection = null, array } if (!($mongo instanceof MongoClient || $mongo instanceof Mongo)) { - throw new Exception\InvalidArgumentException( + throw new Exception\InvalidArgumentException(sprintf( 'Parameter of type %s is invalid; must be MongoClient or Mongo', (is_object($mongo) ? get_class($mongo) : gettype($mongo)) - ); + )); } $this->mongoCollection = $mongo->selectCollection($database, $collection);