[wp-trac] [WordPress Trac] #23026: parent_dropdown() should verify that a post has been fetched
WordPress Trac
noreply at wordpress.org
Thu Dec 20 19:23:06 UTC 2012
#23026: parent_dropdown() should verify that a post has been fetched
-----------------------------+--------------------------
Reporter: mweichert | Type: defect (bug)
Status: new | Priority: normal
Milestone: Awaiting Review | Component: Template
Version: trunk | Severity: minor
Keywords: has-patch |
-----------------------------+--------------------------
If you call parent_dropdown() and no post has been provided or populated,
then an E_NOTICE will be emitted in template.php:683 because $post is
null.
The fix is to adjust line 681 from:
{{{
if ( $items ) {
}}}
to...
{{{
if ($post && $items) {
}}}
I've attached a patch.
To reproduce:
1. Ensure that your server is configured to show E_NOTICE errors.
2. Install NextGEN Gallery
3. Go to the Manage Galleries Page
4. Click on a gallery.
4. Voila. ;)
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23026>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list