[wp-trac] [WordPress Trac] #33413: most PHP classes should be in their own file
WordPress Trac
noreply at wordpress.org
Wed Aug 26 09:30:15 UTC 2015
#33413: most PHP classes should be in their own file
----------------------------+-----------------------------
Reporter: wonderboymusic | Owner: wonderboymusic
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.4
Component: General | Version: trunk
Severity: normal | Resolution:
Keywords: dev-feedback | Focuses:
----------------------------+-----------------------------
Comment (by kovshenin):
It looks like r33748 broke WP-CLI:
{{{
PHP Fatal error: Cannot declare class WP_Http, because the name is
already in use in /home/kovshenin/htdocs/develop.lo/src/wp-includes/class-
http.php on line 15
}}}
It's happening because class-http.php is being included twice, once in
http.php and the [https://github.com/wp-cli/wp-
cli/blob/d0cbb8ab1caa7fbfadbc38954ac342990203b0e4/php/wp-settings-
cli.php#L170 second time] in WP-CLI's version of wp-settings.php just a
moment later. I guess this may break other "forks" of wp-settings.php and
possibly some plugins that include/require the files directly, though a
quick search through the .org directory shows mostly `include_once` and
`require_once`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33413#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list