[wp-trac] [WordPress Trac] #55741: Check the value of WP_ENVIRONMENT_TYPE before using it

WordPress Trac noreply at wordpress.org
Sun Jun 5 08:51:48 UTC 2022


#55741: Check the value of WP_ENVIRONMENT_TYPE before using it
-----------------------------------+---------------------
 Reporter:  dd32                   |       Owner:  (none)
     Type:  enhancement            |      Status:  new
 Priority:  low                    |   Milestone:  6.1
Component:  Bootstrap/Load         |     Version:
 Severity:  trivial                |  Resolution:
 Keywords:  2nd-opinion has-patch  |     Focuses:
-----------------------------------+---------------------

Comment (by ramon fincken):

 About the string strict check. You might add (via filter) a non string
 environment and if you have defined it at your wp-config.php the check
 will pass.
 This is an edge case however, if you want to cover this in the
 `wp_environment_is_allowed` function you will need to add an `is_string`
 check

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


More information about the wp-trac mailing list