PHP message: PHP Warning: foreach() argument must be of type array|object,

#552257
  • Resolved Anonymous
    Rank Math free

    Hello,
    The warning is:
    2023/03/31 05:33:55 [error] 77800#77800: *1974 FastCGI sent in stderr: “PHP message: PHP Warning: foreach() argument must be of type array|object, string given in /www/tatelawoffices_122/public/wp-includes/class-wp-post-type.php on line 612PHP message: PHP Warning: Undefined array key “replace” in /www/tatelawoffices_122/public/wp-content/plugins/seo-by-rank-math-pro/includes/modules/image-seo/class-image-seo-pro.php on line 517PHP message: PHP Warning: Undefined array key “replace” in /www/tatelawoffices_122/public/wp-content/plugins/seo-by-rank-math-pro/includes/modules/image-seo/class-image-seo-pro.php on line 517PHP message: PHP Warning: Undefined array key “replace” in /www/tatelawoffices_122/public/wp-content/plugins/seo-by-rank-math-pro/includes/modules/image-seo/class-image-seo-pro.php on line 517PHP message: PHP Warning: Undefined array key “replace” in /www/tatelawoffices_122/public/wp-content/plugins/seo-by-rank-math-pro/includes/modules/image-seo/class-image-seo-pro.php on line 517PHP message: PHP Warning: Undefined array key “replace” in /www/tatelawoffices_122/public/wp-content/plugins/seo-by-rank-math-pro/includes/modules/image-seo/class-image-seo-pro.php on line 517PHP message: PHP Warning: Undefined array key “replace” in /www/tatelawoffices_122/public/wp-content/plugins/seo-by-rank-math-pro/includes/modules/image-seo/class-image-seo-pro.php on line 517PHP message: PHP Warning: Undefined array key “replace” in /www/tatelawoffices_122/public/wp-content/plugins/seo-by-rank-math-pro/includes/modules/image-seo/class-image-seo-pro.php on line 517PHP message: PHP Warning: Undefined array key “replace” in /www/tatelawoffices_122/public/wp-content/plugins/seo-by-rank-math-pro/includes/modules/image-seo/class-image-seo-pro.php on line 517PHP message: PHP Warning: Undefined array key “excerpts” in /www/tatelawoffices_122/public/wp-content/plugins/q-and-a/inc/shortcodes.php on line 24PHP message: PHP Warning: Undefined array key “replace” in /www/tatelawoffices_122/public/wp-content/plugins/seo-

    Can you solve the issue?

    Thank you.

    Regards
    Subir

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.

    It seems that you’re currently using the Rank Math PRO plugin, but the account you have used to open this ticket is the Rank Math free version.

    Can you please search and forward a receipt from FastSpring.com so we can locate your account and verify it?

    Back to the issue, please check the Replacements settings at WordPress Dashboard > Rank Math > General settings > Images and ensure that values for both find and replace are entered and at least one checkbox is checked:

    Here’s a link for more information:
    https://rankmath.com/kb/image-seo/#replacements

    If you are not using the replacements, please click on remove and save the settings.

    Let us know how it goes. Looking forward to helping you.

    Thank you.

    Anonymous
    Rank Math free

    Hello,
    Thank you for your reply. Actually, I am working on my client’s website and at this time, I don’t have their login details. I corrected the settings and error gone. But new warning arise.
    2023/03/31 10:27:29 [error] 5394#5394: *260 FastCGI sent in stderr: “PHP message: PHP Warning: foreach() argument must be of type array|object, string given in /www/tatelawoffices_122/public/wp-includes/class-wp-post-type.php on line 612” while reading response header from upstream, client: 103.153.130.31, server: staging-tatelawoffices.kinsta.cloud, request: “POST /wp-admin/admin-ajax.php HTTP/1.1”, upstream: “fastcgi://unix:/var/run/php8.0-fpm-tatelawoffices.sock:”, host: “staging-tatelawoffices.kinsta.cloud:62858”, referrer: “https://staging-tatelawoffices.kinsta.cloud/wp-admin/admin.php?page=rank-math-options-general”

    Can you please tell me the reason?

    Thank you.

    Regards
    Subir

    Hello,

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    However, this is just a warning, so if this is not creating any issues with the functionalities then you can ignore this if you want. If this warning is appearing in the frontend then you can try to follow this URL to disable this: https://docs.themeisle.com/article/819-how-to-turn-on-off-debugging-in-wordpress

    Looking forward to helping you.

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘PHP message: PHP Warning: foreach() argument must be of type array|object,’ is closed to new replies.