Fatal error in ReviewCarouselShortcode
-
Hi RateMyAgent team,
I am getting a PHP fatal error on my site when using the RateMyAgent Official plugin’s Review Carousel with Elementor.
Error log:
PHP Fatal error: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, stdClass given in /home/socialrealty/public_html/wp-content/plugins/ratemyagent-official/blocks/ReviewCarousel/Shortcode/ReviewCarouselShortcode.php:39
Stack trace (truncated):
#0 /home/socialrealty/public_html/wp-content/plugins/ratemyagent-official/blocks/ReviewCarousel/Shortcode/ReviewCarouselShortcode.php(39): array_filter()
#1 /home/socialrealty/public_html/wp-includes/shortcodes.php(434): Rma\Blocks\ReviewCarousel\Shortcode\ReviewCarouselShortcode->render()
#2 [internal function]: do_shortcode_tag()
…
#27 {main}
thrown in /home/socialrealty/public_html/wp-content/plugins/ratemyagent-official/blocks/ReviewCarousel/Shortcode/ReviewCarouselShortcode.php on line 39
Environment details:
Site: https://socialrealty.au/
Plugin: RateMyAgent Official (version: [1.6.4])
WordPress version: [6.8.3]
PHP version: [8.3]
Page builder: Elementor (using the Shortcode widget to render the Review Carousel)
When the Review Carousel shortcode/widget is active on the page, the site hits this fatal error; disabling the RateMyAgent Official plugin (or removing the Review Carousel from the page) resolves it.
It looks like array_filter() in ReviewCarouselShortcode::render() is being called on a stdClass rather than an array. Could you please:
Confirm this is a known issue or provide a patched version, and
Add a guard or cast so the code safely handles non‑array responses from the API?
Happy to provide any additional logs or a test page if needed.
Thanks in advance for your help.The page I need help with: [log in to see the link]
You must be logged in to reply to this topic.