// Fix when file is missing

This commit is contained in:
Jerome Nadaud
2013-11-29 18:07:50 +01:00
parent a597881da7
commit fbf2c26093
@@ -92,7 +92,9 @@ class AdminAttachmentsControllerCore extends AdminController
if (($obj = $this->loadObject(true)) && Validate::isLoadedObject($obj))
{
$link = $this->context->link->getPageLink('attachment', true, NULL, 'id_attachment='.$obj->id);
$size = round(filesize(_PS_DOWNLOAD_DIR_.$obj->file) / 1024);
if (file_exists(_PS_DOWNLOAD_DIR_.$obj->file))
$size = round(filesize(_PS_DOWNLOAD_DIR_.$obj->file) / 1024);
}
$this->fields_form = array(