Page 1 of 1

[0.7.9 RC5] bug in file account_download.php

Posted: Mon Dec 29, 2008 11:32 pm
by JNeuhoff
There is a bug in file catalog/controller/account_download.php in function download():

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'));
		}
		....

Re: [0.7.9 RC5] bug in file account_download.php

Posted: Tue Dec 30, 2008 12:09 am
by Qphoria
Fixed in SVN
Thanks JN :)