[wp-trac] [WordPress Trac] #41180: ABSPATH definition - incorrect on chrooted vhost

WordPress Trac noreply at wordpress.org
Fri Aug 16 18:18:24 UTC 2024


#41180: ABSPATH definition - incorrect on chrooted vhost
-------------------------------------------------+-------------------------
 Reporter:  dacartpl                             |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Bootstrap/Load                       |     Version:  4.8
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch needs-testing needs-       |     Focuses:
  refresh                                        |  performance
-------------------------------------------------+-------------------------
Changes (by jorbin):

 * keywords:  has-patch needs-testing => has-patch needs-testing needs-
               refresh


Comment:

 The underlying code has changed a bit so this will need to be refreshed.
 The ternary in the define is a bit hard to read, I think something a bit
 more explicit like

 {{{
 // Ensure ABSPATH isn't set as double slash
 if ( __DIR__ === '/' ) {
    define( 'ABSPATH', __DIR__ );
 } else {
    define( 'ABSPATH', __DIR__ . '/' );
 }
 }}}

 I also don't have a chrooted vhosts env setup to test this. I would love
 if a shared host that has one would reach out so I could test this before
 committing it.

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


More information about the wp-trac mailing list