Support » Plugin: Democracy Poll » Multisite activation limits to first 100 sites

  • File upgrade-activate-funcs.php, line 14. get_sites returns only the first 100 sites by default, which means that the 101th

    I see two ways to fix this.

    1. Provide the “number” option with a huge number, like so : get_sites([“number”=> PHP_INT_MAX]). This can potentially have a performance impact.

    2. Loop 100 results at a time like so :
    $site_offset = 0
    if(…. ? get_sites([“offset” => $site_offset])…)
    foreach…

    $site_offset += 100
    }

    Thanks !

  • The topic ‘Multisite activation limits to first 100 sites’ is closed to new replies.