We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
mutual/mutual
1 parent db65343 commit 9cc8cd6Copy full SHA for 9cc8cd6
lib/Cleantalk/ApbctWP/State.php
@@ -566,7 +566,14 @@ protected function setOptions()
566
$wpdb_option_name = $this->option_prefix . '_' . $option_name;
567
//prevent fatal on broken serialized data
568
try {
569
- $option = get_option($wpdb_option_name);
+ if ( ! is_main_site() && $this->network_settings['multisite__work_mode'] == 2 ) {
570
+ // Options have to be gathered from the main site in this case
571
+ switch_to_blog(get_main_site_id());
572
+ $option = get_option($wpdb_option_name);
573
+ restore_current_blog();
574
+ } else {
575
576
+ }
577
} catch (\UnexpectedValueException $e) {
578
$default_option_name = 'default_' . $option_name;
579
delete_option($wpdb_option_name);
0 commit comments