Skip to content

Commit

Permalink
Fix boolean compatibility for Contao 4
Browse files Browse the repository at this point in the history
  • Loading branch information
de-es authored Jul 5, 2024
1 parent edc07e8 commit ee896f8
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Terminal42\NotificationCenterBundle\Controller\FrontendModule\Newsletter;

use Contao\CoreBundle\ContaoCoreBundle;
use Contao\CoreBundle\DependencyInjection\Attribute\AsFrontendModule;
use Contao\Environment;
use Contao\Idna;
Expand Down Expand Up @@ -53,6 +54,9 @@ protected function addRecipient($strEmail, $arrNew): void
$objRecipient->tstamp = $time;
$objRecipient->email = $strEmail;
$objRecipient->active = false;
if (version_compare(ContaoCoreBundle::getVersion(), '5.0', '<')) {
$objRecipient->active = '';
}
$objRecipient->addedOn = $time;
$objRecipient->save();

Expand Down

0 comments on commit ee896f8

Please sign in to comment.