Skip to content

Commit

Permalink
メールフォームにて、getMailFormGroupValidErrors を実行した直後のフィールドが取得できない問題を改善
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuring committed Feb 27, 2024
1 parent dc7ac2a commit adda7e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/bc-mail/src/View/Helper/MailformHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ public function authCaptcha(string $fieldName, array $options = [])
*/
public function getGroupValidErrors(ResultSetInterface $mailFields, string $groupValid, array $options = [], bool $distinct = true)
{
// 呼び出し元のイテレーションに影響が出ないようにクローンを作成
$mailFields = clone $mailFields;
$errors = [];
foreach ($mailFields as $mailField) {
if ($mailField->group_valid !== $groupValid) continue;
Expand Down

0 comments on commit adda7e9

Please sign in to comment.