From f24e3d79eab750b8489f86217e8123919e75451f Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Thu, 13 Dec 2012 16:40:17 -0500 Subject: [PATCH] [HttpKernel] Revise MongoDbProfilerStorage::write() return value This should be functionally equivalent, but will be more robust if update() ever returns a falsey value. --- .../Component/HttpKernel/Profiler/MongoDbProfilerStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php index 382ebbfe1f..94b81c2ddb 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php @@ -104,7 +104,7 @@ class MongoDbProfilerStorage implements ProfilerStorageInterface $result = $this->getMongo()->update(array('_id' => $profile->getToken()), array_filter($record, function ($v) { return !empty($v); }), array('upsert' => true)); - return isset($result['ok']) ? (boolean) $result['ok'] : true; + return (boolean) (isset($result['ok']) ? $result['ok'] : $result); } /**