File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
modules/os2forms_encrypt/src Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -66,12 +66,12 @@ public function enabledEncrypt(): void {
6666
6767 /** @var \Drupal\webform\Entity\Webform $webform */
6868 foreach ($ webforms as $ webform ) {
69- $ elements = $ webform ->getElementsDecoded ();
69+ $ elements = $ webform ->getElementsDecodedAndFlattened ();
7070 $ config = $ webform ->getThirdPartySettings ('webform_encrypt ' );
7171
7272 $ changed = FALSE ;
7373 foreach ($ elements as $ key => $ element ) {
74- if (!isset ($ config ['element ' ][$ key ])) {
74+ if (!isset ($ config ['element ' ][$ key ]) || $ config [ ' element ' ][ $ key ][ ' encrypt_profile ' ] === NULL ) {
7575 $ config ['element ' ][$ key ] = [
7676 'encrypt ' => TRUE ,
7777 'encrypt_profile ' => $ defaultEncryptionProfile ,
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ public function enableEncryption(WebformInterface $webform): void {
8989 }
9090
9191 // Check that there are any elements to enable encryption on.
92- $ elements = $ webform ->getElementsDecoded ();
92+ $ elements = $ webform ->getElementsDecodedAndFlattened ();
9393
9494 if (empty ($ elements )) {
9595 return ;
You can’t perform that action at this time.
0 commit comments