Skip to content

Commit

Permalink
remove version check altogether
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzmg committed Nov 29, 2023
1 parent 8a008dd commit b69420e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Form/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Codefog\HasteBundle\Form\Validator\ValidatorInterface;
use Codefog\HasteBundle\Model\DcaRelationsModel;
use Codefog\HasteBundle\Util\ArrayPosition;
use Composer\InstalledVersions;
use Contao\ArrayUtil;
use Contao\Controller;
use Contao\DataContainer;
Expand Down Expand Up @@ -924,10 +923,9 @@ public function fetch(string $fieldName): mixed
}

$widget = $this->widgets[$fieldName];
$contaoVersion = InstalledVersions::getVersion('contao/core-bundle') ?? InstalledVersions::getVersion('contao/contao');

// Support file uploads in Contao 5
if (version_compare($contaoVersion, '5.0', '>=') && $widget instanceof UploadableWidgetInterface) {
if ($widget instanceof UploadableWidgetInterface) {
return $widget->value;
}

Expand Down

0 comments on commit b69420e

Please sign in to comment.