[wp-trac] [WordPress Trac] #62581: Fatal error TypeError: basename(): wp-settings.php in latest WP 6.8 Beta

WordPress Trac noreply at wordpress.org
Wed Nov 27 08:59:44 UTC 2024


#62581: Fatal error TypeError: basename(): wp-settings.php in latest WP 6.8 Beta
--------------------------+-----------------------------
 Reporter:  neo2k23       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 I get a fatal error in the latest wp 6.8 beta nightly build


 Fatal error: Uncaught TypeError: basename(): Argument #1 ($path) must be
 of type string, Theme given in /home/public_html/wp-settings.php:686 Stack
 trace: #0 /home/public_html/wp-settings.php(686): basename(Object(Theme))
 #1 /home/wp-config.php(96): require_once('/home/...') #2 /home/public_html
 /wp-load.php(55): require_once('/home/..') #3 /home/public_html/wp-
 admin/admin.php(34): require_once('/home/...') #4 /home/public_html/wp-
 admin/about.php(10): require_once('/home/...') #5 {main} thrown in
 /home/public_html/wp-settings.php on line 686


 cause by this code

 Fatal error: Uncaught TypeError: basename(): Argument #1 ($path) must be
 of type string, Theme given in /home/public_html/wp-settings.php:686 Stack
 trace: #0
  /home/public_html/wp-settings.php(686): basename(Object(Theme)) #1 /home
 /wp-config.php(96): require_once('/home/...') #2 /home/public_html/wp-
 load.php(55): require_once('/home/..') #3 /home/public_html/wp-
 admin/admin.php(34): require_once('/home/...') #4 /home/public_html/wp-
 admin/about.php(10): require_once('/home/...') #5 {main} thrown in
 /home/public_html/wp-settings.php on line 686


 {{{#!php
 <?php
                 // Load the functions for the active theme, for both
 parent and child theme if applicable.
                 foreach ( wp_get_active_and_valid_themes() as $theme ) {
                         if ( file_exists( $theme . '/functions.php' ) ) {
                                 include $theme . '/functions.php';
                         }

                         $theme = wp_get_theme( basename( $theme ) );
                         $theme->load_textdomain();
                 }
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62581>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list