[wp-trac] [WordPress Trac] #13184: admin.php can re-include itself in certain environments

WordPress Trac wp-trac at lists.automattic.com
Fri Apr 30 04:40:28 UTC 2010


#13184: admin.php can re-include itself in certain environments
----------------------------+-----------------------------------------------
 Reporter:  nacin           |       Owner:                        
     Type:  defect (bug)    |      Status:  new                   
 Priority:  high            |   Milestone:  3.0                   
Component:  Administration  |     Version:                        
 Severity:  blocker         |    Keywords:  dev-feedback has-patch
----------------------------+-----------------------------------------------
 admin.php?import=XX doesn't work on my environment. It includes admin-
 header.php, which then does a check:

 {{{
 if ( if (!isset($_GET["page"])) require_once('./admin.php');
 }}}

 This then requires admin.php, and it fails on redefinition of functions.

 On my environment -- PHP 5.3.0, Apache 2.2.11, Mac (those bundled with
 10.6) -- I can reproduce this on trunk, 2.9, and 2.8. The code itself has
 been around for years. I'm not really sure why this is cropping up now.

 This originated on the wp-testers list, on someone running a similar setup
 (though PHP 5.3.1). westi tested (I think he uses MAMP) and it worked on
 5.3.1, 5.3.6, and I think a 5.2 branch.

 Suggested fix:
 {{{
 if ( if (!defined('WP_ADMIN')) require_once('./admin.php');
 }}}
 That said, there may be a reason for the code as it is.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13184>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list