Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Festival sign-up without a phone field passes null to setAttribute() (PHP 8.1 deprecation)

オープン 初心者向け
#588 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
php
領域
backend

調査の方向性

system/datatypes/festival.php の478行目付近にある signupAction() を読み、同じブロックが省略可能な attending フィールドをどのように処理するか比較してください。設定されたフォームで [[phone]] が省略されている場合、dataFor(self::FIELD_NAME_PHONE) が null を返すことを確認してください。空文字列をデフォルト値として渡し、その登録ケースで非推奨警告が発生しなくなることを確認すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Impact: Low Level: Easy Pagetype: Festival Type: Bug Value: Coders

Problem. A festival whose sign-up form has no phone field logs a PHP 8.1 deprecation on every sign-up: Passing null to parameter #2 ($value) of type string is deprecated at system/datatypes/festival.php:478 (main d97ab7b), where signupAction() stores $form->dataFor(self::FIELD_NAME_PHONE) without a default. The phone field is optional in a configured sign-up form, so dataFor() returns null.

This is the same kind of fault as #408 (null to setAttribute()), in a place that #408 and its pull request #508 do not cover.

Steps to reproduce (fictional test site, PHP 8.2 and 8.5). Make a festival page, configure a sign-up form without [[phone]], and sign up as a visitor: the container log shows the deprecation.

Proposed fix. $form->dataFor(self::FIELD_NAME_PHONE, ''), as the other optional fields of the same block do with attending.

Found while writing known-bug tests for #520.

🤖 Generated with Claude Code

主要言語
JavaScript
スター
5
フォーク
9
平均マージ
18時間 7分
マージ済み PR(30日)
11

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PlanBCode/hypha のほかの issue

PlanBCode/hypha の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。