[wp-trac] [WordPress Trac] #15442: Indexes no longer start at 0 for get_the_category()
WordPress Trac
wp-trac at lists.automattic.com
Thu Dec 9 02:56:39 UTC 2010
#15442: Indexes no longer start at 0 for get_the_category()
--------------------------+-------------------------------------------------
Reporter: ramenboy | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.1
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
Changes (by gazouteast):
* cc: gazouteast (added)
Comment:
Possibly related, but certainly a side effect
[http://wordpress.org/support/topic/yet-another-category_id-how-to-
thread?replies=1]
Multiple issues surfacing -
$category = get_the_category(); = fails to get the category ID numbers
echo $category[0]->cat_name; = (tested on two different servers now) the
" -> " is being read as the closer for a " <!-- " HTML comment tag.
The context I'm trying to use this in, is in the sidebar, in a widget, to
grab the category ID number and assign it to a variable for use in a
function call. In this instance, it's a new build where the category
number, Adrotate group and block, and the NextGEN gallery ID numbers are
all synchronised such that ID 1 = name Art in all cases. But, the
category ID call is failing and blocking the build from progressing.
I'm not submitting this as a support shout, but rather to give you an
instance of failure. The initial ticket report now gives me a clue as to
why.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15442#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list