MIRSPORTA-260 Отсутствующие картинки на 10баллов
"обход" ошибки с отсутствующим файлом изображения при попытке форсированного создания варианта push-update
This commit is contained in:
@ -86,7 +86,8 @@ abstract class File
|
||||
* @var $this Image
|
||||
*/
|
||||
if (!array_key_exists($size, $this->variants)) {
|
||||
if ($force_create && $this->getIsNoEmpty()) {
|
||||
$original_file_path = Config::get('PATH_WEB_ROOT') . '/' . $this->getWebName();
|
||||
if ($force_create && $this->getIsNoEmpty() && file_exists($original_file_path)) {
|
||||
Upload::imageVariant($this, $size);
|
||||
} else {
|
||||
$this->variants[$size] = new ImageVariant();
|
||||
|
Reference in New Issue
Block a user