Fatal Error, get_theme() must be of the type string, array given
-
The widget suddenly stopped working on one of my WP sites. In the dev console, I can see that this URL is returning a 500 error:
/wp-json/wordpress-popular-posts/v1/popular-posts/widget/2?is_single=28365When opening the URL in my browser, I see the default WP error “a fatal error occurred on this site”
In the logs, I see this:
AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: Argument 1 passed to WordPressPopularPosts\Themer::get_theme() must be of the type string, array given, called in /var/www/vhosts/x.com.br/httpdocs/wp-content/plugins/wordpress-popular-posts/src/Output.php on line 187 and defined in /var/www/vhosts/x.com.br/httpdocs/wp-content/plugins/wordpress-popular-posts/src/Themer.php:129\nStack trace:\n#0 /var/www/vhosts/x.com.br/httpdocs/wp-content/plugins/wordpress-popular-posts/src/Output.php(187): WordPressPopularPosts\Themer->get_theme()\n#1 /var/www/vhosts/x.com.br/httpdocs/wp-content/plugins/wordpress-popular-posts/src/Rest/WidgetEndpoint.php(121): WordPressPopularPosts\Output->build_output()\n#2 /var/www/vhosts/x.com.br/httpdocs/wp-content/plugins/wordpress-popular-posts/src/Rest/WidgetEndpoint.php(80): WordPressPopularPosts\Rest\WidgetEndpoint->prepare_widget_item_for_response()\n#3 /var/www/vhosts/x.com.b…'
The topic ‘Fatal Error, get_theme() must be of the type string, array given’ is closed to new replies.