diff --git a/controllers/admin/AdminImagesController.php b/controllers/admin/AdminImagesController.php index 9a1e2dd9a..e03028ea5 100644 --- a/controllers/admin/AdminImagesController.php +++ b/controllers/admin/AdminImagesController.php @@ -527,6 +527,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'; } }