Automattic / Automattic/jetpack
PHP Notice from Contact form when CPT does not support author / author not set
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
I've updated the issue title to better reflect the underlying problem.
#### Steps to reproduce the issue
1. Add a Form block.
2. Remove all the default fields.
3. Insert a Checkbox
4. Save
5. View.
6. See Notice

#### What I expected
I was creating this form to catalog the `Jetpack-field/checkbox` at
https://jetpack.wp-a2z.org/block/checkbox-jetpack-field-checkbox
I didn’t expect to see any Notices.
#### What happened instead
Notice: Trying to get non-property object ... grunion-contact-form.php on line 1813
**Screenshots**
See above plus

Contributor guide
Research direction
Reproduce the notice using the listed Form block steps, then inspect grunion-contact-form.php around line 1813. Done means the same form renders without the reported PHP Notice when the author is unavailable or unset.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100