|Re: Strange return sfView::NONE behaviour [message #94500 is a reply to message #94434 ]
||Mon, 01 March 2010 18:13
Registered: January 2006
Location: West Midlands, UK
Yes, I didn't understand your previous code. Presumably you would set your headers in your action, then call your library, then return sfView::NONE? [Edit: ah, you did output the content, with setContent - missed that!]|
If you start your output in dwJpgraphPlugin, and you only *sometimes* get a 'headers already sent' error, then there may be a problem with the library.
That said, try this. Set your headers in your action, followed by the call to dwJpgraphPlugin, then throw a sfStopException, and see if that sorts it. I believe this is how symfony stops things internally while providing the internals a way to clear up after itself.
If that doesn't work, can you get the image data from the library into a string? If so, then passing it from the action to the template would be trivial, and the problem would be solved.
[Updated on: Mon, 01 March 2010 18:14]