[wp-trac] [WordPress Trac] #39767: wp-admin failures upon line breaks in functions.php
WordPress Trac
noreply at wordpress.org
Thu Feb 2 11:46:22 UTC 2017
#39767: wp-admin failures upon line breaks in functions.php
-------------------------+----------------------
Reporter: gregvie | Owner:
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: General | Version: 4.7.2
Severity: normal | Resolution: invalid
Keywords: | Focuses:
-------------------------+----------------------
Changes (by swissspidy):
* status: new => closed
* resolution: => invalid
* component: Customize => General
* milestone: Awaiting Review =>
Comment:
Hey there,
Welcome to WordPress Trac!
Whitespace after closing PHP tags causing all sorts of weirdness is not a
bug in WordPress, but simply how PHP works. From the
[http://php.net/manual/en/language.basic-syntax.phptags.php PHP website]:
> If a file is pure PHP code, it is preferable to omit the PHP closing tag
at the end of the file. This prevents accidental whitespace or new lines
being added after the PHP closing tag, which may cause unwanted effects
because PHP will start output buffering when there is no intention from
the programmer to send any output at that point in the script.
If your theme or plugin has line breaks after `?>`, you need to inform
the developer to fix this (ideally by omitting the closing tag at the end
of the file). Again, since this is how PHP is designed, WordPress cannot
account for this.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/39767#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list