The MU forums have moved to WordPress.org

Problem with $wbdp scope in functions.php (5 posts)

  1. idealog
    Member
    Posted 17 years ago #

    I'm trying to load WordPress from my application using:
    define('WP_USE_THEMES', false);
    require( dirname(__FILE__) . '/wp-blog-header.php' );

    but I'm getting an error with $wpdb being undefined when it reaches is_blog_installed in functions.php

    If I var_dump $wpdb in wp_settings.php just before the call, $wpdb is ok.

    Inside functions.php, even though the is_blog_installed has global $wpdb at the beginning, the variable is null - causing execution to exit.

    Any idea what I might be doing wrong?

  2. lunabyte
    Member
    Posted 17 years ago #

    http://wordpress.org/support/

    This is the MU forums.

  3. idealog
    Member
    Posted 17 years ago #

    I am using MU.

  4. lunabyte
    Member
    Posted 17 years ago #

    Then you should have specified that.

  5. mysorehead
    Member
    Posted 17 years ago #

    does $wpdb->options have a value a that point for you?

About this Topic

  • Started 17 years ago by idealog
  • Latest reply from mysorehead