[wp-trac] [WordPress Trac] #40632: Fix undefined index notice in wp-includes/user.php

WordPress Trac noreply at wordpress.org
Thu Mar 25 10:58:45 UTC 2021

#40632: Fix undefined index notice in wp-includes/user.php
 Reporter:  arkimedia                |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Users                    |     Version:  4.7.4
 Severity:  normal                   |  Resolution:
 Keywords:  close reporter-feedback  |     Focuses:
Changes (by SergeyBiryukov):

 * keywords:  needs-refresh => close reporter-feedback
 * milestone:  5.8 => Awaiting Review


 Hi @arkimedia, thanks for the ticket and the patch! Sorry it took so long
 for someone to get back to you.

 `! empty()` is essentially the concise equivalent to `isset( $var ) &&
 $var != false`, it can be used to check for existence of an array index or
 object property directly, so an additional `isset()` check would be

 If the issue is still relevant, could you provide the steps to reproduce
 it on a clean install? I think the notice might have been about
 `$old_user_data->user_pass` instead, but I have not seen any other reports
 of it.

Ticket URL: <https://core.trac.wordpress.org/ticket/40632#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list