[wp-trac] [WordPress Trac] #48100: the quotes around those two constants are missing causing PHP error

WordPress Trac noreply at wordpress.org
Sat Sep 21 20:33:23 UTC 2019


#48100: the quotes around those two constants are missing causing PHP error
--------------------------+------------------------------
 Reporter:  feminatzi     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by ayeshrajans):

 Hello @feminatzi - Welcome to WordPress Trac!

 In PHP, an unquoted string like the ones you have in the ticket
 description are interpreted as PHP constants
 (https://www.php.net/manual/en/language.constants.syntax.php).

 If the constants are not prior declared, you will indeed see errors.

 In a healthy site, these two constants would be declared before any user
 code is executed, so no errors are shown. The unquoted code in fact is the
 correct one; I think you have a theme or a plugin that races this
 declaration.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48100#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list