[wp-trac] [WordPress Trac] #60299: Default assignment of `use_ssl` user meta value causes unnecessary DB write.

WordPress Trac noreply at wordpress.org
Mon Oct 14 21:15:04 UTC 2024


#60299: Default assignment of `use_ssl` user meta value causes unnecessary DB
write.
-------------------------------------------------+-------------------------
 Reporter:  prettyboymp                          |       Owner:
                                                 |  adamsilverstein
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.7
Component:  Users                                |     Version:
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests has-        |     Focuses:
  testing-info commit                            |  performance
-------------------------------------------------+-------------------------

Comment (by SergeyBiryukov):

 In [changeset:"59232" 59232]:
 {{{
 #!CommitTicketReference repository="" revision="59232"
 Users: Further adjust the check for `use_ssl` meta in `wp_insert_user()`.

 This removes a redundant check for a falsey value, which is equivalent to
 the `empty()` check directly before.

 Includes minor adjustments in the unit test:
 * Adding a `@covers` tag.
 * Correcting the description for clarity.
 * Using `assertSame()` for strict type checking.

 Follow-up to [59216].

 See #60299.
 }}}

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


More information about the wp-trac mailing list