Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

Commit

Permalink
[SwiftmailerBundle] optimized code
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed May 27, 2011
1 parent 9dad05a commit a8179b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DataCollector/MessageDataCollector.php
Expand Up @@ -47,7 +47,7 @@ public function __construct(ContainerInterface $container, $isSpool)
public function collect(Request $request, Response $response, \Exception $exception = null)
{
// only collect when Swiftmailer has already been initialized
if (in_array('Swift_Mailer', get_declared_classes())) {
if (class_exists('Swift_Mailer', false)) {
$logger = $this->container->get('swiftmailer.plugin.messagelogger');
$this->data['messages'] = $logger->getMessages();
$this->data['messageCount'] = $logger->countMessages();
Expand Down

0 comments on commit a8179b0

Please sign in to comment.