[wp-trac] [WordPress Trac] #57121: 'get_current_user_id' in 'gettext' filter causing memory error

WordPress Trac noreply at wordpress.org
Tue Feb 28 13:20:20 UTC 2023


#57121: 'get_current_user_id' in 'gettext' filter causing memory error
-------------------------------+-----------------------------
 Reporter:  adityaarora010196  |       Owner:  SergeyBiryukov
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:  6.1.2
Component:  Users              |     Version:  6.1
 Severity:  normal             |  Resolution:  fixed
 Keywords:  has-patch          |     Focuses:
-------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55433" 55433]:
 {{{
 #!CommitTicketReference repository="" revision="55433"
 Users: Adjust the initialization of the `$duplicated_keys` array in
 `wp_salt()`.

 This avoids an endless loop if `get_current_user_id()` is used in a
 callback attached to the `gettext` filter.

 With the translated phrase moved into a separate assignment, the function
 succeeds in setting the static `$duplicated_keys` array once and no longer
 goes into this code section on subsequent calls.

 Follow-up to [54249].

 Props adityaarora010196, SergeyBiryukov.
 Fixes #57121.
 }}}

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


More information about the wp-trac mailing list