[-] BO : Fix timeout handling on product images regeneration

This commit is contained in:
Mikael Blotin
2013-12-03 14:42:14 +01:00
parent 6ddf220aee
commit d81e81e4f3
@@ -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';
}
}