#108382 Модерация. Ошибка 500 при заведении нового бренда
This commit is contained in:
		
							
								
								
									
										1
									
								
								File.php
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								File.php
									
									
									
									
									
								
							@@ -375,6 +375,7 @@ class File extends \yii\db\ActiveRecord
 | 
			
		||||
        $patch = $this->getDir(true);
 | 
			
		||||
        $fileName = $this->name . '.' . $this->ext;
 | 
			
		||||
        $filePatch = $patch . $fileName;
 | 
			
		||||
        $this->cropFile = $this->cropFile && file_exists($this->cropFile) ? $this->cropFile : null;
 | 
			
		||||
        $quality = $quality > 100 || $quality <= 0 ? 90 : $quality;
 | 
			
		||||
        if (file_exists($filePatch) && in_array(exif_imagetype($filePatch), [IMAGETYPE_JPEG, IMAGETYPE_PNG]))
 | 
			
		||||
        {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user