[wp-trac] [WordPress Trac] #17912: WordPress not "realizing" that I'm an author on 404 error page
WordPress Trac
noreply at wordpress.org
Tue Apr 16 21:05:17 UTC 2013
#17912: WordPress not "realizing" that I'm an author on 404 error page
-------------------------------------------------+-------------------------
Reporter: itsalltech1 | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: General | Review
Severity: normal | Version: 3.2
Keywords: has-patch needs-testing dev- | Resolution:
feedback |
-------------------------------------------------+-------------------------
Comment (by MikeHansenMe):
When I am viewing a 404 page with the code above in my header.php file I
run into a few problem.
{{{
$args = array_slice( func_get_args(), 2 );
}}}
Grabs any extra parameters. Later in the code it uses $args[0] without
even checking that it is set. This causes a ton of undefined index and
later does
{{{
$post = get_post( $args[0] );
}}}
an assumes $post is post data when it is actually an empty array, causing
even more undefined index notices.
My patch just breaks out when they are not set. No need for conditional
checks when there are other notices anyways.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17912#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list