[wp-trac] [WordPress Trac] #39445: Add class_exists() check before defining the PasswordHash class

WordPress Trac noreply at wordpress.org
Tue Jan 3 13:19:21 UTC 2017


#39445: Add class_exists() check before defining the PasswordHash class
---------------------------+-----------------------------
 Reporter:  DavidAnderson  |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  General        |    Version:  trunk
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 I have a project that calls wp-load.php, but after already loading the
 PasswordHash class. (It authenticates the user before loading WP).

 After the update from WP 4.6.1 to WP 4.7, this now causes a PHP fatal
 error, because now wp-settings.php unconditionally calls require().

 The attached patch will not define the PasswordHash class if it already
 exists.

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


More information about the wp-trac mailing list