Page 1 of 1

Admin Customer area Error 500

Posted: Mon Jun 06, 2016 4:51 am
by Nicarlo
Hey everyone,

I'm having a little bit of an issue that im hoping someone would be able to give me a hand on.

I'm currently running opencart 2.2.0 and when i access the admin area and try to view the Customers->Customers section I get an Error 500.

I was able to go through the logs and find the following error

Code: Select all

PHP Parse error:  syntax error, unexpected '&&' (T_BOOLEAN_AND), expecting ')' in /home/xxx/domains/xxxxxxx/public/admin/controller/customer/customer.php on line 1105
When I locate this file and view this line it doesnt appear to have any issues with it

Code: Select all

				foreach ($custom_fields as $custom_field) {
					if (($custom_field['location'] == 'address') && $custom_field['required'] && empty($value['custom_field'][$custom_field['custom_field_id']])) {
						$this->error['address'][$key]['custom_field'][$custom_field['custom_field_id']] = sprintf($this->language->get('error_custom_field'), $custom_field['name']);
					} elseif (($custom_field['type'] == 'text' && !empty($custom_field['validation'] && $custom_field['location'] == 'address')) && !filter_var($value['custom_field'][$custom_field['custom_field_id']], FILTER_VALIDATE_REGEXP, array('options' => array('regexp' => $custom_field['validation'])))) {
                        $this->error['address'][$key]['custom_field'][$custom_field['custom_field_id']] = sprintf($this->language->get('error_custom_field_validate'), $custom_field['name']);
                    }
I must also mention that I am running NGINX w/ PHP-FPM and MariaDB on this installation.

Would anyone have any recommendations on where I should look next to get to the bottom of this?

Re: Admin Customer area Error 500

Posted: Mon Jun 06, 2016 2:50 pm
by i2Paq
This is a known bug and if your would have used our FREE search, or look at the GitHub issues, or the 2.2.0.0 Bug topic you would have found your solution.

Re: Admin Customer area Error 500

Posted: Tue Jun 07, 2016 1:52 am
by AlexDW

Re: Admin Customer area Error 500

Posted: Tue Jun 07, 2016 2:03 am
by Nicarlo
Thank you Alex,

This fixed it!

Much appreciated

Re: Admin Customer area Error 500

Posted: Fri Jul 22, 2016 8:11 pm
by ukchris
Thanks.
Fixed it for me too :)