I have a website http://www.specialeditionchocolate.co.uk built in OC v 1.4.9.? and it has been running fine for months. I created a staff user who now adds products to the site and he has tinkered with category names. All of a sudden the site will not load at all. Or the admin.
I asked him what he's done (via email) and he said "From what I can remember the last changes I made were:-
1. I added 2 products, one to the Easter category and the other to both Easter and Animal categories.
2. I added additional picture to the Victorian button products (in all 3 flavours).
3. I changed the main image of the 3pack bar entries (in all 3 flavours).
When I'm changing or adding products I always have the web page open in another tab. So when I have 'enabled' the changes I can just refresh the page so I can see that the changes have been made and what it actually looks like on the site. Everything seemed ok last time I was on.
The last time I rearranged the order of the categories was about 3-4 weeks ago. Many people made purchases since then
That's all I can think of at the moment"
I have looked at the error.txt file but it doesn't mean much to me

Code: Select all
2012-03-19 14:55:43 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/specialeditionchocolate.co.uk/httpdocs/admin/controller/common/filemanager.php on line 378
2012-03-19 14:55:43 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/specialeditionchocolate.co.uk/httpdocs/admin/controller/common/filemanager.php on line 378
2012-03-19 14:55:43 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/specialeditionchocolate.co.uk/httpdocs/admin/controller/common/filemanager.php on line 378
2012-03-19 14:55:43 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/specialeditionchocolate.co.uk/httpdocs/admin/controller/common/filemanager.php on line 378
2012-03-19 14:55:43 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/specialeditionchocolate.co.uk/httpdocs/admin/controller/common/filemanager.php on line 378
2012-03-19 14:55:43 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/specialeditionchocolate.co.uk/httpdocs/admin/controller/common/filemanager.php on line 378
2012-03-19 14:55:43 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/specialeditionchocolate.co.uk/httpdocs/admin/controller/common/filemanager.php on line 378
2012-03-19 14:55:43 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/specialeditionchocolate.co.uk/httpdocs/admin/controller/common/filemanager.php on line 378
2012-03-19 14:55:43 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/specialeditionchocolate.co.uk/httpdocs/admin/controller/common/filemanager.php on line 378
2012-03-19 14:55:43 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/specialeditionchocolate.co.uk/httpdocs/admin/controller/common/filemanager.php on line 378
2012-03-19 14:55:43 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/specialeditionchocolate.co.uk/httpdocs/admin/controller/common/filemanager.php on line 378
2012-03-19 14:55:43 - PHP Warning: Invalid argument supplied for foreach() in /var/www/vhosts/specialeditionchocolate.co.uk/httpdocs/admin/controller/common/filemanager.php on line 378
2012-03-20 22:24:01 - PP_STANDARD :: VALIDATION FAILED : PP_Standard - Possible Scam: IPN/PDT Price "-9.03" does not match OpenCart Total "9.5500". Order needs manual verification
This is what it says around line 378 in filemanager.php
Code: Select all
protected function recursiveFolders($directory) {
$output = '';
$output .= '<option value="' . substr($directory, strlen(DIR_IMAGE . 'data/')) . '">' . substr($directory, strlen(DIR_IMAGE . 'data/')) . '</option>';
$directories = glob(rtrim(str_replace('../', '', $directory), '/') . '/*', GLOB_ONLYDIR);
foreach ($directories as $directory) {
$output .= $this->recursiveFolders($directory);
}
return $output;
}
public function rename() {
$this->load->language('common/filemanager');
$json = array();
if (isset($this->request->post['path']) && isset($this->request->post['name'])) {
if ((strlen(utf8_decode($this->request->post['name'])) < 3) || (strlen(utf8_decode($this->request->post['name'])) > 255)) {
$json['error'] = $this->language->get('error_filename');
}
$old_name = rtrim(DIR_IMAGE . 'data/' . str_replace('../', '', $this->request->post['path']), '/');
if (!file_exists($old_name) || $old_name == DIR_IMAGE . 'data') {
$json['error'] = $this->language->get('error_rename');
}
if (is_file($old_name)) {
$ext = strrchr($old_name, '.');
} else {
$ext = '';
}
$new_name = dirname($old_name) . '/' . str_replace('../', '', $this->request->post['name'] . $ext);
if (file_exists($new_name)) {
$json['error'] = $this->language->get('error_exists');
}
}
if (!$this->user->hasPermission('modify', 'common/filemanager')) {
$json['error'] = $this->language->get('error_permission');
}
if (!isset($json['error'])) {
rename($old_name, $new_name);
$json['success'] = $this->language->get('text_rename');
}
$this->load->library('json');
$this->response->setOutput(Json::encode($json));
