If the customer isn't logged in, it uses the undefined variable $session. Proposed fix: Insert the line highlighted in red:
Code: Select all
function download() {
$config =& $this->locator->get('config');
$customer =& $this->locator->get('customer');
$database =& $this->locator->get('database');
$download =& $this->locator->get('download');
$request =& $this->locator->get('request');
$response =& $this->locator->get('response');
$url =& $this->locator->get('url');
[color=red] $session =& $this->locator->get('session');
[/color]
if (!$customer->isLogged()) {
$session->set('redirect', $url->ssl('account_download'));
$response->redirect($url->ssl('account_login'));
}
....