Skip to content

Commit 4011b0f

Browse files
committed
Hotfix SubDcaWidget
1 parent 6a8b3f0 commit 4011b0f

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/CoreBundle/Contao/Hooks/AbstractContentElementAndModuleCallback.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ public function getMetaDescriptionAttributes(\DC_Table $objDC)
315315
* @param \DC_Table $dataContainer The data container calling this method.
316316
* @param string $elementName The type name to search for.
317317
*
318-
* @return void
318+
* @return @return string|null
319319
*
320320
* @SuppressWarnings(PHPMD.Superglobals)
321321
* @SuppressWarnings(PHPMD.CamelCaseVariableName)
@@ -365,11 +365,11 @@ protected function buildFilterParamsFor(\DC_Table $dataContainer, $elementName)
365365
*
366366
* @param string|null $value The value to save.
367367
*
368-
* @return string
368+
* @return string|null
369369
*/
370370
public function saveCallback(string $value = null)
371371
{
372-
return \base64_decode($value);
372+
return null === $value ? null : \base64_decode($value);
373373
}
374374

375375
/**
@@ -381,7 +381,7 @@ public function saveCallback(string $value = null)
381381
*/
382382
public function loadCallback(string $value = null)
383383
{
384-
return trim(\base64_encode($value), '=');
384+
return null === $value ? null : trim(\base64_encode($value), '=');
385385
}
386386

387387
/**

src/Widgets/SubDcaWidget.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* @author Danilo Benevides <danilobenevides01@gmail.com>
1717
* @author Sven Baumann <baumann.sv@gmail.com>
1818
* @author Cliff Parnitzky <github@cliff-parnitzky.de>
19+
* @author Ingolf Steinhardt <info@e-spin.de>
1920
* @copyright 2012-2019 The MetaModels team.
2021
* @license https://github.com/MetaModels/core/blob/master/LICENSE LGPL-3.0-or-later
2122
* @filesource
@@ -566,8 +567,7 @@ public function generate()
566567
$strBody = sprintf('<tbody><tr>%s</tr></tbody>', implode("</tr>\n<tr>", $arrOptions));
567568

568569
$strOutput = sprintf(
569-
'<table cellspacing="0"%s cellpadding="0" id="ctrl_%s" class="tl_modulewizard multicolumnwizard" ' .
570-
'summary="MultiColumnWizard">%s%s</table>',
570+
'<table cellspacing="0"%s cellpadding="0" id="ctrl_%s" class="tl_subdca">%s%s</table>',
571571
(($this->style) ? ('style="' . $this->style . '"') : ('')),
572572
$this->strId,
573573
$strHead,

0 commit comments

Comments
 (0)