[wp-trac] [WordPress Trac] #22342: WP_DEBUG "undefined index" notices in get_metadata() for empty arrays
WordPress Trac
noreply at wordpress.org
Wed Jul 10 21:03:07 UTC 2013
#22342: WP_DEBUG "undefined index" notices in get_metadata() for empty arrays
-------------------------------------------------+-------------------------
Reporter: doublesharp | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting
Component: Warnings/Notices | Review
Severity: minor | Version: 3.1
Keywords: has-patch needs-testing dev- | Resolution:
feedback 2nd-opinion |
-------------------------------------------------+-------------------------
Comment (by JD55):
Replying to [comment:4 nacin]:
> if you want to return an array, then do so if $single, but wrap it in an
array (with key 0 being your array) if not $single.
I hadn't thought of that hack. But it still seems like, well, a hack, to
me. If its going to stay this way it should be mentioned in the codex so
people know this is a 'feature' and not a bug.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22342#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list