Title: PHP Warning array to String
Last modified: April 11, 2024

---

# PHP Warning array to String

 *  Resolved [Tim Reeves](https://wordpress.org/support/users/tim-reeves/)
 * (@tim-reeves)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-warning-array-to-string/)
 * WP 6.5.2 + Rank Math 1.0.216 + PHP 8.1 causing warnings in the PHP-FPM log:
 * [11-Apr-2024 01:09:57] WARNING: [pool alexander.vc] child 18418 said into stderr:“
   PHP message: PHP Warning: Array to string conversion in /var/www/vhosts/alexander.
   vc/httpdocs/wp-content/plugins/seo-by-rank-math/includes/opengraph/class-image.
   php on line 606”
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-warning-array-to-string%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [Rank Math Support](https://wordpress.org/support/users/rankmathsupport/)
 * (@rankmathsupport)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-warning-array-to-string/#post-17681537)
 * Hello [@tim-reeves](https://wordpress.org/support/users/tim-reeves/),
 * Thank you for contacting Rank Math support.
 * This issue usually happens when the archive page is not able to fetch the image
   from the first post/product of that archive to set it as the og:image.
 * In this case, please make sure that all the custom post types on the website 
   have a fallback thumbnail for Facebook under **WordPress Dashboard > Rank Math
   > Titles & Meta settings** and see if that works for you.
 * Let us know how that goes. Looking forward to helping you.
 *  Thread Starter [Tim Reeves](https://wordpress.org/support/users/tim-reeves/)
 * (@tim-reeves)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-warning-array-to-string/#post-17700899)
 * Thanks for your prompt help. I looked through ALL the settings under “Titles &
   Meta” and made sure that there was a default image set, and explicit images where
   an input field was available. However, the problem remains. I did notice the 
   problem-causing request:
 * request: “GET /podcast/ HTTP/2.0”
 * Looking at the title and meta settings, there is Category (light grey background)
   of “Post + Podcast”, with the available categories Keywords and Podcasts, but
   neither of these offer an image setting, only Archive Title and Archive Description.
 * So I’m a bit stumped…
 * Could you not simply protect class-image.php from causing the warning?
 *  Plugin Support [Rank Math Support](https://wordpress.org/support/users/rankmathsupport/)
 * (@rankmathsupport)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/php-warning-array-to-string/#post-17703347)
 * Hello [@tim-reeves](https://wordpress.org/support/users/tim-reeves/),
 * Let’s try using the following filter code to disable the fallback image functionality:
   `
   add_filter( 'rank_math/opengraph/pre_set_content_image', '__return_true' );`You
   may refer to this guide on how to add filters to your website: [https://rankmath.com/kb/wordpress-hooks-actions-filters/](https://rankmath.com/kb/wordpress-hooks-actions-filters/)
 * If that doesn’t work, head over to your WP Dashboard > Rank Math > Status & Tools
   > System Status and click the “Copy System Info to Clipboard” button, and paste
   it here so we can further analyze the issue.
 * Looking forward to helping you.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP Warning array to String’ is closed to new replies.

 * ![](https://ps.w.org/seo-by-rank-math/assets/icon.svg?rev=3438330)
 * [Rank Math SEO – AI SEO Tools to Dominate SEO Rankings](https://wordpress.org/plugins/seo-by-rank-math/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/seo-by-rank-math/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/seo-by-rank-math/)
 * [Active Topics](https://wordpress.org/support/plugin/seo-by-rank-math/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/seo-by-rank-math/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/seo-by-rank-math/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Rank Math Support](https://wordpress.org/support/users/rankmathsupport/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/php-warning-array-to-string/#post-17703347)
 * Status: resolved