#12334 closed defect (bug) (fixed)
A series of typos/thinkos that should be fixed
Reported by: | rlerdorf | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.0 | Priority: | low |
Severity: | normal | Version: | |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description (last modified by )
In wp-includes/capabilities.php around line 773:
$cap_key = $wpdb->get_blog_prefix( $blog_id ); $cap_key. 'capabilities';
The author probably meant .= here.
In wp-admin/import/blogger.php around line 168:
} elseif ( $tag['tag'] == 'SUMMARY' ) { $blog['summary'] == $tag['value'];
The == on the second line there should obviously be just a single =
In wp-admin/includes/user.php around line 835:
function default_password_nag_edit_user($user_ID, $old_data) { global $user_ID;
The author overwrites the passed in $user_ID argument with the global version right away. This makes very little sense. Choose one or the other.
In wp-includes/class-simplepie.php around line 4070(!!) there are 3 lines of code that don't make sense:
(int) $seconds = array_pop($temp); (int) $minutes = array_pop($temp); (int) $hours = array_pop($temp);
Those casts don't do anything. The author probably meant to put the cast on the right hand side perhaps?
Change History (9)
#2
@
15 years ago
- Milestone changed from Unassigned to 3.0
- Owner set to nacin
- Status changed from new to accepted
Thanks for the report, sorry we overlooked it.
capabilities.php was fixed yesterday: [13666]
blogger.php was fixed today: [13684] after I saw your slides.
I'll look into default_password_nag_edit_user() -- it looks like it works correctly, but that we're doing too much work. I think we should be comparing the argument (the user who was just edited) to the global (logged in user), and returning if they don't match, as we're only worried about when the logged in user changes their own password (and that way we can clear the nag).
We can report the SimplePie casting upstream, and also make the change as well.
#7
@
14 years ago
This looks like the global should go.
Basically the current code works for the user logged in but not if you edit another user which had the nag set.
Oops, the formatting on the code snippets got messed up and brackets were dropped, but I think you can still get the gist of these.