#43788 closed defect (bug) (worksforme)
Widgets.php Errors
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.9.5 |
Component: | Widgets | Keywords: | close |
Focuses: | Cc: |
Description
Getting some Array errors in widgets.php header output. Surely this is a duplicate, yet can't find anything in existing tickets. This doesn't appear to be a PHP version issue, as I have tested on 5.4 through to 7.2.
<br /> <b>Warning</b>: array_merge(): Argument #5 is not an array in <b>../wp-includes/widgets.php</b> on line <b>1159</b><br /> <br /> <b>Warning</b>: array_diff(): Argument #2 is not an array in <b>../wp-includes/widgets.php</b> on line <b>1160</b><br /> <br /> <b>Warning</b>: Invalid argument supplied for foreach() in <b>../wp-includes/widgets.php</b> on line <b>1162</b><br /> <br /> <b>Warning</b>: array_merge(): Argument #1 is not an array in <b>../wp-includes/widgets.php</b> on line <b>1170</b><br />
Attachments (1)
Change History (6)
#2
@
5 years ago
Hi Sergy,
As you can see from the screenshot this is a 4.9.5 instance. I'll try switching to a default theme with plugs disabled.
#3
@
5 years ago
- Resolution set to worksforme
- Status changed from new to closed
OK I disabled all the plugins, switched theme to default and the error is no more. Switched back to theme and re-enabled plugs and it's not come back.
Must have been a caching issue of an old version of the file maybe as I had WP Super Cache enabled, must have forced a refresh of the cache when I disabled and re-enabled.
Thanks for the heads up.
Note: See
TracTickets for help on using
tickets.
Hi @mtecuk, welcome to WordPress Trac! Thanks for the report.
These warnings were fixed in 4.9.2, see #42603. As far as I can see, it should no longer be possible for
wp_map_sidebars_widgets()
to return a non-array.Could you confirm you're still seeing them in 4.9.5? Does it still happen with all plugins disabled and a default theme (Twenty Seventeen) activated? Does it happen if you switch to another theme and back to the current one?