Uncaught TypeError: Unsupported operand types: int * string
-
I encountered this fatal PHP error when checking the debug function. The error occurred after the “tags” section. Maybe I don’t have any tags? This is on version 4.1.16
It seems as though I’m only getting one page worth of links per sitemap xml file, so no more than 10 pages per sitemap (unless I’m missing a next page link somewhere). Update: Somehow I had Links Per Page set to 10. I emptied that field and it reset to 1000, so that helps that issue.
I made the error go away by adding this, but I don’t know if this actually fixed the issue or hid it.
$offset = (int)$offset;
$links_per_page = intval($links_per_page);Error log:
PHP Fatal error: Uncaught TypeError: Unsupported operand types: int * string in /home/wp_****/**.com/wp-content/plugins/google-sitemap-generator/class-googlesitemapgeneratorstandardbuilder.php:669 Stack trace: #0 /home/wp_****/**.com/wp-content/plugins/google-sitemap-generator/class-googlesitemapgeneratorstandardbuilder.php(50): GoogleSitemapGeneratorStandardBuilder->build_product_tags(Object(GoogleSitemapGenerator), '-sitemap') #1 /home/wp_****/**.com/wp-includes/class-wp-hook.php(324): GoogleSitemapGeneratorStandardBuilder->content(Object(GoogleSitemapGenerator), 'producttags', '-sitemap') #2 /home/wp_****/**.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #3 /home/wp_****/**.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #4 /home/wp_****/**.com/wp-content/plugins/google-sitemap-generator/sitemap-core.php(1823): do_action('sm_build_conten...', Object(GoogleSitemapGenerator), 'producttags', '-sitemap') #5 /home/wp_****/**.com/wp-content/plugins/google-sitemap-generator/class-googlesitemapgeneratorui.php(319): GoogleSitemapGenerator->simulate_sitemap('producttags', '-sitemap') #6 /home/wp_****/**.com/wp-content/plugins/google-sitemap-generator/sitemap-core.php(2679): GoogleSitemapGeneratorUI->html_show_options_page() #7 /home/wp_****/**.com/wp-content/plugins/google-sitemap-generator/class-googlesitemapgeneratorloader.php(716): GoogleSitemapGenerator->html_show_options_page() #8 /home/wp_****/**.com/wp-includes/class-wp-hook.php(324): GoogleSitemapGeneratorLoader::call_html_show_options_page('') #9 /home/wp_****/**.com/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #10 /home/wp_****/**.com/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #11 /home/wp_****/**.com/wp-admin/admin.php(259): do_action('settings_page_g...') #12 /home/wp_****/**.com/wp-admin/options-general.php(10): require_once('/home/wp_7tkr9e...') #13 {main} thrown in /home/wp_****/**.com/wp-content/plugins/google-sitemap-generator/class-googlesitemapgeneratorstandardbuilder.php on line 669
The topic ‘Uncaught TypeError: Unsupported operand types: int * string’ is closed to new replies.