From 90664ff8747496bea7b7dbcec6c970805e10446c Mon Sep 17 00:00:00 2001
From: Vladimir Gorej <gorej@codescale.net>
Date: Sat, 7 Jun 2014 14:08:49 +0200
Subject: [PATCH] LOG4PHP-219: fixed tests and deprecation warnings. #2


Signed-off-by: Vladimir Gorej <gorej@codescale.net>
---
 src/main/php/appenders/LoggerAppenderMongoDB.php | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/main/php/appenders/LoggerAppenderMongoDB.php b/src/main/php/appenders/LoggerAppenderMongoDB.php
index f327378..776da64 100644
--- a/src/main/php/appenders/LoggerAppenderMongoDB.php
+++ b/src/main/php/appenders/LoggerAppenderMongoDB.php
@@ -240,7 +240,7 @@ class LoggerAppenderMongoDB extends LoggerAppender {
 		# Building connection options.
 		$options = array(
 			'w' => (is_numeric($this->writeConcern)) ? (int) $this->writeConcern : $this->writeConcern,
-			'timeout' => $this->timeout,
+			'connectTimeoutMS' => $this->timeout,
 			'wTimeout' => $this->writeConcernTimeout
 		);
 		if ($this->replicaSet !== null) {
@@ -280,8 +280,11 @@ class LoggerAppenderMongoDB extends LoggerAppender {
 				}
 			}
 			if ($this->capped === true) {
-				$this->collection = $db->createCollection($this->collectionName, $this->capped, $this->cappedSize,
-														  $this->cappedMax);
+				$this->collection = $db->createCollection($this->collectionName, array(
+					'capped' => $this->capped,
+					'size' => $this->cappedSize,
+					'max' => $this->cappedMax
+				));
 			} else {
 				$this->collection = $db->selectCollection($this->collectionName);
 			}
-- 
1.8.1.2

