Festival sign-up without a phone field passes null to setAttribute() (PHP 8.1 deprecation)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 82/100
Research direction
Read system/datatypes/festival.php around line 478 in signupAction() and compare how the same block handles the optional attending field. Confirm that dataFor(self::FIELD_NAME_PHONE) can return null when the configured form omits [[phone]]; done means supplying an empty-string default and confirming the deprecation no longer occurs for that sign-up case.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- JavaScript
- Stars
- 5
- Forks
- 9
- Avg merge
- 18h 49m
- Merged PRs (30d)
- 13
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PlanBCode/hypha
-
Component: User interface Impact: Low Level: Easy Pagetype: Peer reviewed article Type: Bug Value: Visitors
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Impact: Medium Level: Easy Type: Bug Value: Users
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Impact: Medium Level: Easy Pagetype: Mailinglist Type: Bug Value: Users
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Impact: Low Level: Easy Type: Bug Value: Coders
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
PlanBCode/hypha#586 · 1 comment ·
Maintainers usually reply within 1 day
-
Impact: Medium Level: Easy Type: Bug Usecase: De Stadsbron Value: Visitors
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PlanBCode/hypha#522 · 1 comment ·
Maintainers usually reply within 1 day
Similar issues
-
Upgrade listener stays on a custom server after close when `preClose` is setPossibly taken @RaphaelFakhri claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
fastify/fastify-websocket#388 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
DietrichGebert/ponytail#1343 ·
Maintainers usually reply within 1 day
-
cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
swombat/souls-house#770 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day