heimrichhannot / contao-multi-column-editor-bundle

This module offers an input type for editing one or more records in frontend and backend.
GNU General Public License v3.0
6 stars 7 forks source link

Warning: Illegal offset type in isset or empty #7

Closed zonky2 closed 4 years ago

zonky2 commented 4 years ago

Warning: Illegal offset type in isset or empty

ErrorException:
Warning: Illegal offset type in isset or empty

  at /home/xxx/contao4_2020/vendor/heimrichhannot/contao-multi-column-editor-bundle/src/EventListener/HookListener.php:94
  at HeimrichHannot\MultiColumnEditorBundle\EventListener\HookListener->loadDataContainerHook('tl_files')
     (/home/xxx/contao4_2020/vendor/contao/core-bundle/src/Resources/contao/library/Contao/DcaLoader.php:119)
  at Contao\DcaLoader->loadDcaFiles(false)
     (/home/xxx/contao4_2020/vendor/contao/core-bundle/src/Resources/contao/library/Contao/DcaLoader.php:70)
  at Contao\DcaLoader->load(false)
     (/home/xxx/contao4_2020/vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:1331)
  at Contao\Controller::loadDataContainer('tl_files')
     (/home/xxx/contao4_2020/vendor/contao/core-bundle/src/Resources/contao/library/Contao/DcaExtractor.php:372)
  at Contao\DcaExtractor->createExtract()
  ...
zonky2 commented 4 years ago

fix

        if (!($name = System::getContainer()->get('huh.request')->getPost('name'))) {
            return;
        }

+        if (is_array($name)) {
+            return;
+        }

        if (isset($dca['fields'][$name])) {
            return;
        }
zonky2 commented 4 years ago

pls update or fix the repo

Defcon0 commented 4 years ago

Thanks, @zonky2 !

Defcon0 commented 4 years ago

Merged in v2.5.3