[wp-trac] [WordPress Trac] #23400: insert_blog() can possible return the wrong blog id when plugin/theme uses refresh_blog_details action
WordPress Trac
noreply at wordpress.org
Tue Feb 5 23:07:11 UTC 2013
#23400: insert_blog() can possible return the wrong blog id when plugin/theme uses
refresh_blog_details action
-----------------------------+-------------------------
Reporter: feedmeastraycat | Type: enhancement
Status: new | Priority: normal
Milestone: Awaiting Review | Component: General
Version: trunk | Severity: normal
Keywords: |
-----------------------------+-------------------------
The function [http://core.trac.wordpress.org/browser/trunk/wp-includes/ms-
functions.php#L1106 insert_blog()] returns $wpdb->insert_id after calling
refresh_blog_details(). So if a plugin or theme is using the
[http://core.trac.wordpress.org/browser/trunk/wp-includes/ms-
blogs.php#L254 refresh_blog_details action] and does something that
changed $wpdb, the returned blog id will be wrong and WordPress creates
table names with the wrong id in their name.
I understand if this isn't considered a bug. But I've attached a suggested
patch anyway. I think it would be good.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23400>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list