[wp-trac] [WordPress Trac] #34348: Error during add term
WordPress Trac
noreply at wordpress.org
Mon Oct 19 03:11:32 UTC 2015
#34348: Error during add term
------------------------------+-----------------------------
Reporter: sebastian.pisula | Owner: boonebgorges
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.4
Component: Taxonomy | Version: trunk
Severity: major | Resolution: fixed
Keywords: needs-patch | Focuses: administration
------------------------------+-----------------------------
Changes (by boonebgorges):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"35269"]:
{{{
#!CommitTicketReference repository="" revision="35269"
Don't store `data` as a property on `WP_Term` objects.
`wp_ajax_add_term()` fetches a term using `get_term()`, and passes the
term to
`WP_Ajax_Response`, which expects each of the term's properties to be
scalar.
Having `$data` as a `stdClass` (meant to mimic `WP_User::data`, populated
by
a `get_row()` database query) violated this expectation, causing fatal
string
conversion errors. As a workaround, `$term->data` is converted so that it
is
no longer an actual property of the term object, but is assembled only
when
requested in the magic `__get()` method.
Fixes #34348.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34348#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list