Skip to content

Exception when loading form in FE with static include not active #5

Open
@sypets

Description

@sypets

In the docs, there is an option described to not include the TypoScript static include:

Do not include the TypoScript Record "Powermail Cleaner Template

https://github.com/in2code-de/powermail_cleaner/blob/v12/Documentation/Configuration/General.rst

However, when I do that, I get an exception:

PHP Warning: Undefined array key "powermail_cleaner_enabled" in /var/www/site-uol12/vendor/in2code/powermail_cleaner/Classes/Controller/FormController.php line 23

Reproduce

  1. Install powermail
  2. setup a simple working form
  3. install powermail_cleaner
  4. Do not aktivate powermail_cleaner TypoScript static include
  5. Load the form in the FE

Now the mentioned exception occurs.

in /var/www/site-uol12/vendor/in2code/powermail_cleaner/Classes/Controller/FormController.php line 23

if ((empty($this->settings['powermailCleaner']) || $this->settings['powermailCleaner']['deletionBehavior']==='') && ((int)$this->settings['powermail_cleaner_enabled'] === 1)) {

Should use ((int)($this->settings['powermail_cleaner_enabled'] ?? 0)) === 1

workaround

Activate static include, but disable:

plugin.tx_powermail.settings.setup.powermail_cleaner_enabled = 0

versions

  • latest powermail_cleaner (v12 branch)
  • TYPO3 12.4.22
  • PHP 8.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions