Undefined variable $screen_layout_columns when filtering out screen options
|Reported by:||griffinjt||Owned by:||ryan|
When using the screen_options_show_screen filter to remove the screen tab completely, an undefined variable notice appears with WP_DEBUG on. Specifically, the $screen_layout_columns variable is undefined because the current code expects it to be set and to be an integer.
This patch fixes it by setting it equal to itself while still casting it as an integer. Can't find any issues in my testing.
Change History (28)
comment:15 ryan — 2 years ago
- Owner set to ryan
- Resolution set to fixed
- Status changed from new to closed
comment:17 in reply to: ↑ 16 griffinjt — 2 years ago
comment:18 SergeyBiryukov — 2 years ago
- Resolution fixed deleted
- Status changed from closed to reopened