I am writing a custom task for my Symfony project. In it I am sending
a bunch of e-mails generated using content from the database. To
compose the e-mail message, I am using an instance of sfPartialView so
that I can use the same partial template for each message and
substitute in the data.
The sfPartialView constructor requires a context to be passed to it,
which I am creating using the task's configuration, like so:
$context = sfContext::createInstance($this->configuration);
$view = new sfPartialView($context, 'global', 'fooMailTemplate', '');
foreach($dbStuff as $x) {
$view->setPartialVars(array(
'foo' => doSomething($x->foo),
'bar' => $x
));
// Render $view, send mail, etc here...
}
The problem is that when I execute the task, I get a lot of warnings
from sfSessionStorage about how it can't start the session, send
cookies or write session data on session close. This is because the
user I am running the task with doesn't have permission to write to
that part of the filesystem. These warnings don't stop the task doing
its job, but are annoying as they fill the task's output with needless
garbage.
Ideally, I would like to turn session storage off for the task's
context, but I don't see how I can do that. Is there a way to do that?
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en