[wp-trac] [WordPress Trac] #64721: menu-header.php uses relative file_exists() causing wrong submenu URL when PHP CWD is not wp-admin/

WordPress Trac noreply at wordpress.org
Mon Mar 2 09:36:49 UTC 2026


#64721: menu-header.php uses relative file_exists() causing wrong submenu URL when
PHP CWD is not wp-admin/
-----------------------------------+------------------------------
 Reporter:  paoltaia               |       Owner:  (none)
     Type:  defect (bug)           |      Status:  assigned
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Administration         |     Version:  6.9.1
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+------------------------------

Comment (by berislav.grgicak):

 Playground defaults to the PHP CLI SAPI behavior, which doesn't change the
 current working directory. To match native PHP, Playground needs to set
 the CWD to the script directory for the WEB SAPI and keep the root
 directory for the CLI SAPI.

 I'm working on a fix in Playground.

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


More information about the wp-trac mailing list