﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
13184,admin.php can re-include itself in certain environments,nacin,,"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.",defect (bug),closed,high,3.0,Administration,,blocker,fixed,dev-feedback has-patch,aaron@…
