Opened 8 years ago
Closed 4 years ago
#40632 closed defect (bug) (worksforme)
Fix undefined index notice in wp-includes/user.php
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.7.4 |
Component: | Users | Keywords: | close reporter-feedback |
Focuses: | Cc: |
Description
Current solution only checks if $userdata['user_pass']
is not empty, but it doesn't test if index exists.
In attached diff file, isset check have been added in order to fix undefined index notice in wp-includes/user.php on line 1431.
Attachments (1)
Change History (5)
#2
@
4 years ago
- Keywords close reporter-feedback added; needs-refresh removed
- Milestone changed from 5.8 to 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 redundant.
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.
Fix undefined index notice