[wp-trac] [WordPress Trac] #27729: error when wordpress is installed in separate directory then started in site root from function
WordPress Trac
noreply at wordpress.org
Tue Apr 8 22:08:19 UTC 2014
#27729: error when wordpress is installed in separate directory then started in
site root from function
--------------------------+-----------------------------
Reporter: helened | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.8.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
When wordpress is installed in it's own directory and is started within a
function in "index.php" in site root, these errors occur:
This fatal error occurs in WP 3.8.1:
[08-Apr-2014 19:34:50 UTC] PHP Fatal error: Call to a member function
main() on a non-object in .../mywordpress/wp-includes/functions.php on
line 808
In WP 3.9-beta3, the error changes to this non-fatal error:
[08-Apr-2014 19:53:51 UTC] PHP Warning: in_array() expects parameter 2
to be array, null given in .../mywordpress/wp-includes/kses.php on line
1176
Code samples:
index.php (no error):
{{{
<?php require("mywordpress/index.php");?>
}}}
index.php (error):
{{{
<?php
function site_startup(){
require("mywordpress/index.php");
}
site_startup();
exit;
?>
}}}
Tested with PHP 5.4 on Windows (PC XAMPP server) and Linux (Bluehost.com
server).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27729>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list