Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
41c62128
Commit
41c62128
authored
Sep 02, 2015
by
Jordi Boggiano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Verify that the spool is enabled and an actual spool before flushing it
parent
647ccdf3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/Silex/Provider/SwiftmailerServiceProvider.php
src/Silex/Provider/SwiftmailerServiceProvider.php
+1
-1
No files found.
src/Silex/Provider/SwiftmailerServiceProvider.php
View file @
41c62128
...
...
@@ -91,7 +91,7 @@ class SwiftmailerServiceProvider implements ServiceProviderInterface
$app
->
finish
(
function
()
use
(
$app
)
{
// To speed things up (by avoiding Swift Mailer initialization), flush
// messages only if our mailer has been created (potentially used)
if
(
$app
[
'mailer.initialized'
])
{
if
(
$app
[
'mailer.initialized'
]
&&
$app
[
'swiftmailer.use_spool'
]
&&
$app
[
'swiftmailer.spooltransport'
]
instanceof
\Swift_Transport_SpoolTransport
)
{
$app
[
'swiftmailer.spooltransport'
]
->
getSpool
()
->
flushQueue
(
$app
[
'swiftmailer.transport'
]);
}
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment