Code Duplication    Length = 4-4 lines in 2 locations

forms/AssetField.php 1 location

@@ 640-643 (lines=4) @@
637
		}
638
639
		// Check if upload field has an error
640
		if ($this->getUpload()->isError()) {
641
			$error = implode(' ' . PHP_EOL, $this->getUpload()->getErrors());
642
			return null;
643
		}
644
645
		// return tuple array of Filename, Hash and Variant
646
		return $result;

forms/UploadField.php 1 location

@@ 1163-1166 (lines=4) @@
1160
		}
1161
1162
		// Check if upload field has an error
1163
		if ($this->upload->isError()) {
1164
			$error = implode(' ' . PHP_EOL, $this->upload->getErrors());
1165
			return null;
1166
		}
1167
1168
		// return file
1169
		return $this->upload->getFile();