• funsail

    (@funsail)


    I got a multisite.
    When I make a new site, then go to dashboard, I get

    “Warning: Invalid argument supplied for foreach() in /home/user/public_html/wp-includes/query.php on line 1702”

    the line is
    foreach ( $GLOBALS[‘wp_taxonomies’] as $taxonomy => $t ) {

    I tried to add
    echo $GLOBALS[‘wp_taxonomies’];

    but it doesnt print anything

Viewing 3 replies - 1 through 3 (of 3 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Can you wrap the foreach with

    if ( is_array( $GLOBAL['wp-taxonomies'] )

    Thread Starter funsail

    (@funsail)

    Yes that gets rid of the error.
    I’m worried about the cause. Is my DB corrupt?

    This site was copied from my other host, files all copied, import DB, and edited DB for domain names. So I wonder why it gets this error when the old one is fine.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Reinstall the WP core files. It’s more likely one of them got bunged.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error "Warning: Invalid argument supplied for foreach()’ is closed to new replies.