Bug Description
When running Site Kit (v1.149.1) and AAA Option Optimizer (v1.3.1) while running WordPress 6.8-RC1, a fatal error is thrown on the AAA Option Optimizer admin page.
Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /.../wp-content/plugins/google-site-kit/includes/Core/Modules/Modules.php:939
Stack trace:
#0 /.../wp-content/plugins/google-site-kit/includes/Core/Util/Method_Proxy_Trait.php(25): Google\Site_Kit\Core\Modules\Modules->populate_default_shared_ownership_module_settings()
#1 /.../wp-includes/class-wp-hook.php(326): Google\Site_Kit\Core\Modules\Modules->Google\Site_Kit\Core\Util\{closure}()
#2 /.../wp-includes/plugin.php(205): WP_Hook->apply_filters()
#3 /.../wp-includes/option.php(199): apply_filters()
#4 /.../wp-content/plugins/aaa-option-optimizer/src/class-admin-page.php(270): get_option()
#5 /.../wp-includes/class-wp-hook.php(324): Emilia\OptionOptimizer\Admin_Page->render_admin_page()
#6 /.../wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#7 /.../wp-includes/plugin.php(517): WP_Hook->do_action()
#8 /.../wp-admin/admin.php(260): do_action()
#9 /.../wp-admin/tools.php(40): require_once('/home/u83550p78...')
#10 {main} thrown in /.../wp-content/plugins/google-site-kit/includes/Core/Modules/Modules.php on line 939
Steps to reproduce
- Install and activate AAA Option Optimizer & Site Kit.
- Go to Tools -> Option Optimizer
- See error
Screenshots

Additional Context
- PHP Version: 8.1.29 (Supports 64bit values)
- OS: MacOS Sequoia 15.4
- Browser: [e.g. chrome, safari] Chrome (version 134.0.6998.166 (Official Build) (arm64))
- Plugin Version: 1.149.1
- Device: Apple M3 Pro
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- All usage of
default_filter_$option should be reviewed for type safety and updated to avoid potential errors related to mismatch of types.
It is not safe to assume the option value in the filter callback will have the same type as the registered default since a provided $default when calling get_option will take precedence.
Implementation Brief
Test Coverage
- No tests need to be added or updated.
QA Brief
- Install and activate AAA Option Optimizer & Site Kit.
- Go to Tools -> Option Optimizer
- No error should appear
Changelog entry
- Fix bug that can occur when AAA Option Optimizer plugin is installed.
Bug Description
When running Site Kit (v1.149.1) and AAA Option Optimizer (v1.3.1) while running WordPress 6.8-RC1, a fatal error is thrown on the AAA Option Optimizer admin page.
Steps to reproduce
Screenshots
Additional Context
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
default_filter_$optionshould be reviewed for type safety and updated to avoid potential errors related to mismatch of types.It is not safe to assume the option value in the filter callback will have the same type as the registered default since a provided
$defaultwhen callingget_optionwill take precedence.Implementation Brief
includes/Core/Modules/Modules.php:populate_default_shared_ownership_module_settingsmethod:$sharing_settingsis an array. If not, cast it to an empty array.includes/Modules/Search_Console/Settings.php:registermethod, update the filter callback for the'default_option_' . self::OPTIONhook:$default_optionis an array. If not, cast it to theget_defaultmethod.Test Coverage
QA Brief
Changelog entry