From 7d010dbaa6ac4636544a44e67329048fd13eabe1 Mon Sep 17 00:00:00 2001 From: Mihail Date: Mon, 12 Oct 2015 10:59:09 +0300 Subject: [PATCH] fixed problem with undeleted manual files --- backend/models/UploadFileParsingForm.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/models/UploadFileParsingForm.php b/backend/models/UploadFileParsingForm.php index 19d32c2..4c69939 100644 --- a/backend/models/UploadFileParsingForm.php +++ b/backend/models/UploadFileParsingForm.php @@ -1,6 +1,7 @@ multiparser->parse( $this->file_path, $options ); if( !is_array( $data ) ){ - $data = ['No results']; + throw new ErrorException("Ошибка чтения из файла прайса {$this->file_path}"); } - + // файл больше не нужен - данные прочитаны и сохранены в кеш + unlink($this->file_path); return $data; } -- libgit2 0.21.4