[wp-trac] [WordPress Trac] #11490: Notice: Undefined offset: 0 in link-manager.php
WordPress Trac
wp-trac at lists.automattic.com
Sat Dec 19 08:41:06 UTC 2009
#11490: Notice: Undefined offset: 0 in link-manager.php
--------------------------+-------------------------------------------------
Reporter: ShaneF | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.9.1
Component: General | Version: 2.9
Severity: normal | Keywords: has-patch commit
--------------------------+-------------------------------------------------
== The Problem ==
I was working on a new WordPress design and I set the very first post to
Jan, 1, 2010, 12:00am and when previewing the file I got this error:
{{{
Notice: Undefined offset: 0 in /home/xxxx/public_html/wordpress/wp-
includes/link-template.php on line 1117
}}}
== What happens... ==
{{{
$post = $posts[0];
}}}
is still being set even ''if'' $posts might be empty. Moving the check to
see if $posts is empty instead of $post fixes the issue nicely.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/11490>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list