Post by JNeuhoff » Mon Dec 29, 2008 11:32 pm

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

MHC Web Design
Override Engine * Integrated VQMod * Multilingual SEO * Instant Option Price Calculator * TrustPilot Reviews * Download Options * Free Download Buttons * Export/Import Tool * Template Switcher PHP/Twig


User avatar
Expert Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Qphoria » Tue Dec 30, 2008 12:09 am

Fixed in SVN
Thanks JN :)

OpenCart 2.0.x Mod Update Info

Image
Donate!|OpenCart Basics|GeoZones
Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 3 guests