[wp-trac] [WordPress Trac] #37123: Explicitly globalize $wpdb in either wp-settings.php or ms-settings.php

WordPress Trac noreply at wordpress.org
Fri Jun 17 18:37:33 UTC 2016


#37123: Explicitly globalize $wpdb in either wp-settings.php or ms-settings.php
-----------------------------+--------------------------------------
 Reporter:  danielbachhuber  |      Owner:
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  4.6
Component:  Bootstrap/Load   |    Version:
 Severity:  normal           |   Keywords:  needs-patch dev-feedback
  Focuses:                   |
-----------------------------+--------------------------------------
 `ms-settings.php` implicitly expects `$wpdb` to be a globalized variable.
 However, neither `wp-settings.php` nor `ms-settings.php` explicitly
 globalizes it, which causes a fatal when `wp-settings.php` is called
 within a function.

 `$wpdb` should be explicitly globalized, either in `wp-settings.php` or
 `ms-settings.php`. I don't have a strong preference as to which.

 From https://github.com/wp-cli/wp-
 cli/pull/3031/commits/dc38f0834d6cd47f3c424e5ae2d357da81567f54

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


More information about the wp-trac mailing list