[wp-trac] [WordPress Trac] #43804: Undefined offset: 0 in ../wp-includes/taxonomy.php on line 1903
WordPress Trac
noreply at wordpress.org
Thu Apr 19 00:39:50 UTC 2018
#43804: Undefined offset: 0 in ../wp-includes/taxonomy.php on line 1903
--------------------------+-----------------------------
Reporter: vasyltech | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: trunk
Severity: normal | Keywords: has-patch
Focuses: |
--------------------------+-----------------------------
The issue is pretty trivial. When there are no terms assigned to a post,
the condition on 1894 will return false and this immediately will cause
PHP error because $taxonomies array does not have any records inside.
To reproduce the issue, simply call wp_get_object_terms function with
post, page or custom post type that does not have a single hierarchical
term assigned to.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/43804>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list