#11490 closed defect (bug) (fixed)
Notice: Undefined offset: 0 in link-manager.php
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | normal | Version: | 2.9 |
Component: | Warnings/Notices | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
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.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Moving to 3.0 as I don't think this is severe enough a bug to fix in a point release.