[wp-trac] [WordPress Trac] #33034: Refactor SCRIPT_FILENAME ending with php.cgi check in load.php

WordPress Trac noreply at wordpress.org
Sun Jul 19 10:58:49 UTC 2015


#33034: Refactor SCRIPT_FILENAME ending with php.cgi check in load.php
----------------------------+------------------------------
 Reporter:  wildpeat        |       Owner:
     Type:  enhancement     |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Bootstrap/Load  |     Version:  trunk
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:
----------------------------+------------------------------

Comment (by wildpeat):

 With the caveat that I'm brand new to PHP, I agree that's more readable
 than the original, but I don't like the constant -7 in the code. I have
 noticed this hardcoding of the string length in lots of other parts of the
 code-base and I'll gladly nod to your experience if this is more idiomatic
 in PHP than the regex.

 Cheers for looking!

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


More information about the wp-trac mailing list