[HttpKernel] Revise MongoDbProfilerStorage::write() return value

This should be functionally equivalent, but will be more robust if update() ever returns a falsey value.
This commit is contained in:
Jeremy Mikola 2012-12-13 16:40:17 -05:00
parent 78c5273913
commit f24e3d79ea

View File

@ -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);
}
/**