WordPress.org

Plugin Directory

debug-bar

#1601 closed defect (fixed)

Array to string conversion notice in WP Query tab

Reported by: d.glockenmeier Owned by: westi
Priority: normal Severity: normal
Plugin: debug-bar Keywords: has-patch
Cc:

Description

query object may contain arrays which is currently not checked and causes implicit array to string conversion.

i attached a patch which fixes this by looping recursively through any object / array found

Attachments (1)

debug-bar.diff (1.5 KB) - added by d.glockenmeier 18 months ago.
Patch file

Download all attachments as: .zip

Change History (5)

d.glockenmeier18 months ago

Patch file

comment:2 d.glockenmeier18 months ago

One thing i forgot to mention, it is reproducible when viewing a custom post type archive page.

comment:3 westi18 months ago

[360621] was the original hacky fix for the Fatal Errors. This looks like a better fix as it shows the data too ;)

Thanks

comment:4 westi18 months ago

  • Owner set to westi
  • Resolution set to fixed
  • Status changed from new to closed

In 624050:

Debug Bar: Fix the display of WP_Query info on Custom Post Type Archive pages.

Make sure that we recursively print the array of information so that we display it all.

Fixes #1601 and improves [360621] props d.glockenmeier for the original patch.

Note: See TracTickets for help on using tickets.