Description
The callback hooked to add_meta_boxes treats the second parameter as a post ID instead of a WP_Post object. On PHP 8+, this can surface TypeErrors and prevent meta boxes from registering/rendering reliably.
Steps to Reproduce
Activate Members plugin
Expected Behavior
No type errors; meta boxes register and render normally.
Actual Behavior
PHP Fatal error: Uncaught TypeError: callback argument #2 ($post) must be of type WP_Post, int given
Hosting Environment
No response
Payment Gateway (if applicable)
None
Transaction ID (if applicable)
No response
API, Server, or Error Logs (if applicable)
Screenshots or Videos
No response
Support Ticket Link
https://wordpress.org/support/topic/incorrect-variable-type-used-with-add_meta_boxes-hook/
Additional Information
No response
Site Health Check Report
Description
The callback hooked to add_meta_boxes treats the second parameter as a post ID instead of a WP_Post object. On PHP 8+, this can surface TypeErrors and prevent meta boxes from registering/rendering reliably.
Steps to Reproduce
Activate Members plugin
Expected Behavior
No type errors; meta boxes register and render normally.
Actual Behavior
PHP Fatal error: Uncaught TypeError: callback argument #2 ($post) must be of type WP_Post, int given
Hosting Environment
No response
Payment Gateway (if applicable)
None
Transaction ID (if applicable)
No response
API, Server, or Error Logs (if applicable)
Screenshots or Videos
No response
Support Ticket Link
https://wordpress.org/support/topic/incorrect-variable-type-used-with-add_meta_boxes-hook/
Additional Information
No response
Site Health Check Report