wp-multi-network icon indicating copy to clipboard operation
wp-multi-network copied to clipboard

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

Open gnanasekaranl opened this issue 6 years ago • 1 comments

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 );

gnanasekaranl avatar Apr 02 '19 20:04 gnanasekaranl

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.

JJJ avatar Aug 25 '21 21:08 JJJ