Skip to content

Commit

Permalink
Fix default value for invisible
Browse files Browse the repository at this point in the history
  • Loading branch information
doishub committed Sep 26, 2022
1 parent db75830 commit 1c842ae
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/Resources/contao/dca/tl_member_notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@
'filter' => true,
'inputType' => 'checkbox',
'eval' => array('tl_class'=>'w50', 'doNotCopy'=>true),
'sql' => "char(1) NOT NULL default '0'"
'sql' => [
'type' => 'boolean',
'default' => false,
],
)
)
);
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/models/MemberNotificationModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public static function findByMember($memberId, $read=null, array $arrOptions=arr
{
if(null === $read)
{
return static::findBy(['pid='.$memberId], null);
return static::findBy(['pid=?'], [$memberId]);
}

return static::findBy(['invisible=?', 'pid=?'], [$read, $memberId], $arrOptions);
Expand Down

0 comments on commit 1c842ae

Please sign in to comment.