[wp-trac] [WordPress Trac] #51619: Undefined $current_role variable in wp-admin/user-new.php (was: Coding standard : Undefined varible)

WordPress Trac noreply at wordpress.org
Sat Oct 24 12:44:53 UTC 2020


#51619: Undefined $current_role variable in wp-admin/user-new.php
--------------------------+-------------------------------
 Reporter:  ravipatel     |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  reviewing
 Priority:  normal        |   Milestone:  5.6
Component:  Users         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  coding-standards
--------------------------+-------------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => reviewing
 * milestone:  Awaiting Review => 5.6


Comment:

 Hi there, thanks for the patch!

 This appears to be a remnant of a variable that was used up to WordPress
 2.6.x, when the Add New User form was still in the `wp-admin/users.php`
 file, as seen in [source:tags/2.6.5/wp-
 admin/users.php?marks=268,278,442#L177 lines 268, 278, 442 here].

 Since the form was moved into a new file in [9614], the variable appears
 to be unused.

 The instances remaining in `wp-admin/users.php` were removed in [28296],
 so this one can be removed too.

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


More information about the wp-trac mailing list