I have an error controller where I send an email on unhandled exceptions. I want to output some variable values which reside in the ‘original’ controller (E.G indexController).
How can I access these values from the ErrorController? E.G $indexController->attr
Well, you can access the original controller action’s view variables from your error controller’s view object. You could send the required values as view variables (if possible), and then, use them in your error controller:
I can say this works, because I’ve tested displaying my view variables in error.phtml, and it displays the original controller’s view variables.
Now, if you need more control, you could use your session to store these values.