Post by teddy_leopold » Wed Oct 17, 2012 8:03 pm

Hi,
Firstly thanks to all who have made opencart possible, fantastic job!
I am using v1.5.2.1 with default template and I notice the following php error that keeps cropping up in the error log :

Undefined index: zone_id in.......................catalog/controller/account/register.php on line 322

I have been able to replicate the error by switching the javascript off in the browser or by setting the security zone in internet explorer to High. This prevents the list of zones being displayed for any country and therefore the person trying to register an account cannot choose one, thereby giving the error. I feel I am seeing an unusually high number of these errors and can´t believe that my findings are the only cause. Is this a bug? Does anyone else have this error?
Any help would be appreciated, thanks in advance.

Newbie

Posts

Joined
Wed Oct 17, 2012 7:53 pm

Post by Johnathan » Tue Oct 23, 2012 12:17 am

Not sure of the exact circumstances that result in this error, but you can get rid of the notice by doing this:

Code: Select all

IN:
/catalog/controller/account/register.php

REPLACE:
if ($this->request->post['zone_id'] == '') {

WITH:
if (isset($this->request->post['zone_id']) && $this->request->post['zone_id'] == '') { 
Note that if that variable is not set, then it won't produce an error that the zone needs to be filled in. If you still want it to produce an error, then change the replacement to:

Code: Select all

if (!isset($this->request->post['zone_id']) || $this->request->post['zone_id'] == '') { 

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by teddy_leopold » Tue Oct 23, 2012 3:30 pm

Hi Johnathan,
Thanks for your reply, i´ll give that a go.

Newbie

Posts

Joined
Wed Oct 17, 2012 7:53 pm
Who is online

Users browsing this forum: No registered users and 39 guests