stuttter / wp-multi-network

A network management interface for global multisite administrators
https://wordpress.org/plugins/wp-multi-network/
GNU General Public License v2.0
222 stars 68 forks source link

Creating default object from empty value and Allowed memory size Fatal error #149

Open gnanasekaranl opened 5 years ago

gnanasekaranl commented 5 years ago

Following error I got,

Warning: Creating default object from empty value in /var/www/app_gic_wordpress_1/html/wp-content/plugins/wp-multi-network/wp-multi-network/includes/functions.php on line 238

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 130968 bytes) in /var/www/app_gic_wordpress_1/html/wp-includes/class-wp-network.php on line 132

Further investigation in functions.php line number 234 overriding $current_site variable like below and this get_network( function pulling wrong data.

$current_site = get_network( $new_network );

Line 201 $current_site variable declaration as a global and overriding line number 234

global $wpdb, $switched_network, $switched_network_stack, $current_site;

If I command this line it's working properly //$current_site = get_network( $new_network );

JJJ commented 3 years ago

Hi @gnanasekaranl 👋

Do you remember what actions you were taking to trigger this situation?

Commenting that line out will definitely break other things, so I wouldn't recommend it.