Merge pull request #1073 from studiokiwik/sk-ps15x-012

[-] BO : Fix timeout handling on product images regeneration
This commit is contained in:
Gregory Roussac
2013-12-03 05:51:27 -08:00

View File

@@ -516,6 +516,8 @@ class AdminImagesControllerCore extends AdminController
$errors = true;
$this->errors[] = Tools::displayError(sprintf('Original image is missing or empty (%s)', $existing_img));
}
if (time() - $this->start_time > $this->max_execution_time - 4) // stop 4 seconds before the tiemout, just enough time to process the end of the page on a slow server
return 'timeout';
}
}