The MU forums have moved to WordPress.org

$table_prefix gets overwritten, why? (2 posts)

  1. Melodiefabrieknl
    Member
    Posted 17 years ago #

    I have noticed some confusion: when I add a global variable to a mu-plugin plugin, the $table_prefix variable is wp_1_ instead of wp_ when I do request on the homepage (the aggregated page), so it gets overwritten somewhere. Or am I missing something?

    I was expecting $table_prefix to contain the value which is added in the wp-config.php file, but it's not. Why?

  2. Melodiefabrieknl
    Member
    Posted 17 years ago #

    found it, in wpmu-settings.php the global variabel is overwritten (line 198):

    $table_prefix = $table_prefix . $blog_id . '_';

    in my opinion it would be better if a new global variable would be created instead of reusing.

About this Topic

  • Started 17 years ago by Melodiefabrieknl
  • Latest reply from Melodiefabrieknl