Skip to content

Commit

Permalink
Support Contao mono repo
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzmg authored Nov 28, 2023
1 parent 25b2f0e commit 8a008dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Form/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -924,9 +924,10 @@ 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(InstalledVersions::getVersion('contao/core-bundle'), '5.0', '>=') && $widget instanceof UploadableWidgetInterface) {
if (version_compare($contaoVersion, '5.0', '>=') && $widget instanceof UploadableWidgetInterface) {
return $widget->value;
}

Expand Down

0 comments on commit 8a008dd

Please sign in to comment.