Changes between Initial Version and Version 1 of Ticket #58152, comment 2
- Timestamp:
- 04/19/2023 11:33:40 PM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #58152, comment 2
initial v1 3 3 It looks like the purpose of the `$spam` variable here is to be included in the `compact()` call in [source:tags/6.2/src/wp-includes/user.php?marks=2330#L2321 line 2330]. 4 4 5 Reading the [source:tags/6.2/src/wp-includes/user.php ?marks=2330#L2450 DocBlock above the suggested change], it makes it immediately clear what `$userdata` is: the raw array of data passed to `wp_insert_user()`, and `$userdata['spam']` is a part of that array. This naming also seems more consistent when being compared with `$old_user_data->spam`.5 Reading the [source:tags/6.2/src/wp-includes/user.php#L2450 DocBlock above the suggested change], it makes it immediately clear what `$userdata` is: the raw array of data passed to `wp_insert_user()`, and `$userdata['spam']` is a part of that array. This naming also seems more consistent when being compared with `$old_user_data->spam`. 6 6 7 7 If we replace it with `$spam`, anyone reviewing the code would then have to spend some more time to find where that variable is defined.