-
Notifications
You must be signed in to change notification settings - Fork 369
Open
Milestone
Description
Describe the bug
On PHP 8+, WP Job Manager triggers warnings for an undefined array key widget_id in WP_Job_Manager_Widget::get_cached_widget() and cache_widget(). The code assumes $args['widget_id'] is always present. The widget should gracefully handle missing widget_id values (e.g. by skipping caching) to avoid PHP warnings and ensure PHP 8+ compatibility.
To Reproduce
Steps to reproduce the behavior:
- Go to 'WP Dashboard -> Appearance -> Widgets"
- Add "Recent/Featured Jobs" widget
- Save Changes
- See error in debug.log
Isolating the problem (mark completed items with an [x]):
- I have deactivated other plugins and confirmed this bug occurs when only WP Job Manager plugin is active.
- This bug happens with a default WordPress theme active.
- I can reproduce this bug consistently using the steps above.
WordPress Environment
- WordPress Version: 6.9
- WP Job Manager Version: 2.4.0
- PHP Version: 8+
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels