8000 [HttpKernel] Revise MongoDbProfilerStorage::write() return value · symfony/symfony@f24e3d7 · GitHub
[go: up one dir, main page]

Skip to content

Commit f24e3d7

Browse files
committed
[HttpKernel] Revise MongoDbProfilerStorage::write() return value
This should be functionally equivalent, but will be more robust if update() ever returns a falsey value.
1 parent 78c5273 commit f24e3d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function write(Profile $profile)
104104

105105
$result = $this->getMongo()->update(array('_id' => $profile->getToken()), array_filter($record, function ($v) { return !empty($v); }), array('upsert' => true));
106106

107-
return isset($result['ok']) ? (boolean) $result['ok'] : true;
107+
return (boolean) (isset($result['ok']) ? $result['ok'] : $result);
108108
}
109109

110110
/**

0 commit comments

Comments
 (0)
0